View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Maybe something like:

Option Explicit
Sub testme()

Dim wks As Worksheet

MsgBox Sheets.Count
MsgBox Worksheets.Count

For Each wks In ActiveWorkbook.Worksheets
MsgBox wks.Name
Next wks
End Sub

Worksheets.count may not equal sheets.count (if you have chart sheets for
example).

MB wrote:

Could someone please post the code that will count the
number of sheets in a workbook and get each sheet name. I
thought I could use the for statement after I got the
number of sheets, but can't seem to get that number.

Thank you


--

Dave Peterson