View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jeff Jeff is offline
external usenet poster
 
Posts: 921
Default List all sheets present in Workbook

that works... thanks!

"Gary''s Student" wrote:

No problem:


Sub allsheet()
Dim w As Worksheet
i = 1
For Each w In ActiveWorkbook.Worksheets
Sheets("Sheet1").Cells(i, "A").Value = w.Name
i = i + 1
Next
End Sub
--
Gary's Student


"JEFF" wrote:

Sorry.... Looking for it to list them in a column within Sheet 1, starting
in A1

"Gary''s Student" wrote:

Sub allsheet()
Dim w As Worksheet
For Each w In ActiveWorkbook.Worksheets
MsgBox (w.Name)
Next
End Sub
--
Gary's Student


"JEFF" wrote:

Hello,

Looking for some code that will return the names of all worksheets present
in the workbook. The number of sheets and their names change...

Help?!