Excel count sheets in a workbook

Registration date
Saturday September 14, 2013
Last seen
November 10, 2013
 Blocked Profile -
how to count the no of sheets in my workbook, like a list or whatever, also get the sheet name against it,

1 reply

Good Morning...

I found this, right from the support page of Microsoft......Have you read any of the supporting documents?

Dim WS_Count As Integer
Dim I As Integer

' Set WS_Count equal to the number of worksheets in the active
' workbook.
WS_Count = ActiveWorkbook.Worksheets.Count

' Begin the loop.
For I = 1 To WS_Count

' Insert your code here.
' The following line shows how to reference a sheet within
' the loop by displaying the worksheet name in a dialog box.
MsgBox ActiveWorkbook.Worksheets(I).Name

Next I

End Sub