Thread: Sheet Listing
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Sheet Listing

Sub ListSheets()
Dim i As Long

On Error Resume Next
Worksheets.Add.Name = "Sheet List"
On Error GoTo 0
Worksheets("Sheet List").Cells.ClearContents
For i = 1 To ActiveWorkbook.Worksheets.Count
Cells(i, "A").Value = Worksheets(i).Name
Next i
Columns(1).AutoFit

End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Darin Kramer" wrote in message
...


Hi There,

Looking for VBA that will put into a new sheet a listing of all sheets
in the current book...

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***