View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default List all sheets present in Workbook

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?!