Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Name and number of sheets
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 |
#2
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|