View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default How can you get a list of sheetnames?

This will put the worksheet names in the IMMEDIATE window

Sub ListWorksheets()
Dim aWS As Worksheet

For Each aWS In ActiveWorkbook.Worksheets
Debug.Print aWS.Name, aWS.CodeName
Next aWS

End Sub

"Jack" wrote:

Hello,

I am trying to get a list of sheetnames or at lesat the first sheet name of
a XSL file.

Thanks in advance for any help,

Jack