Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can you get a list of sheetnames?
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can you get a list of sheetnames?
In a standard module:
Sub ListOutSheetNames() Application.ScreenUpdating = False Dim Nsheet As Worksheet Set Nsheet = Sheets.Add Dim WS As Worksheet Dim r As Integer r = 1 For Each WS In Worksheets If WS.Name < Nsheet.Name Then Nsheet.Range("A" & r) = WS.Name r = r + 1 End If Next WS Application.DisplayAlerts = False Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub "Jack" wrote in message : 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sort Sheetnames when names are Months | Excel Discussion (Misc queries) | |||
Allow relative referencing for imbedded sheetnames in formulas | Excel Worksheet Functions | |||
how to update Listbox of sheetnames if user changes sheetnames? | Excel Programming | |||
read sheetnames with ADO | Excel Programming | |||
can we copy the sheetnames too? | Excel Programming |