Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to list the worksheet names in a workbook using the Immediate window.
What should I type in this window to do this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
? Sheets.Item(2).name
Or you could just write the code to loop the names to the immediate window: Sub SheetNames() Dim intSheets As Integer Dim i As Integer intSheets = Sheets.Count For i = 1 To intSheets Debug.Print Sheets.Item(i).Name Next End Sub Ken "Kirk P." wrote: I want to list the worksheet names in a workbook using the Immediate window. What should I type in this window to do this? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following compound statement will insert the names of all
worksheets in your active workbook in Column A of the active worksheet. Note the use of colons (":") to separate statements. Ignore any line breaks displaying in the newsgroup post. Range("A1").Select:For x = 1 to Application.ActiveWorkbook.Sheets.Count: ActiveCell.Offset(x-1,0).Value=sheets(x).name:Next x Just a side note: Right-clicking on the sheet navigation arrows on the bottom left will display a list of all sheet names. -Glenn Ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a List From Worksheets in a WorkBook | Excel Worksheet Functions | |||
List All Worksheets in Workbook | Excel Discussion (Misc queries) | |||
Summary list of worksheets in workbook | Excel Discussion (Misc queries) | |||
Can I print a list of all of the worksheets within a workbook? | Excel Discussion (Misc queries) | |||
Can I see a list of the worksheets within a workbook without scro. | Excel Worksheet Functions |