Count number of sheets
Still only counts worksheets.
(May be what the OP wants, of course...)
In article ,
Gary''s Student wrote:
Sub sheet_counter()
Dim whichbook As String
whichbook = Application.InputBox("enter workbook name" & Chr(10) & "for
example: Book2")
For Each wb In Workbooks
If whichbook = wb.Name Then
MsgBox (wb.Worksheets.Count)
Exit Sub
End If
Next
MsgBox ("workbook: " & whichbook & " is not currently opened" _
& Chr(10) & "please open and then re-run this macro")
End Sub
|