Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I print worksheet tabs names from exel 2003
I have a workbook with a lot of worksheets and I would like to print a list
of all these worksheet names, as at last count it was over 200 of them. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I print worksheet tabs names from exel 2003
Here's a quck and dirty macro. I know I've seen another posted on line, but
can't find it now. To get to the VBA editor, type ALT F11 Then display the project explorer with CTRL R. Add a module using Insert Module and paste this into the module. Sub worksheetname() Dim aWB As Workbook Dim aws As Worksheet Set aWB = ActiveWorkbook Worksheets.Add.Name = "WorksheetList" Set aws = ActiveSheet Debug.Print aWB.Sheets.Count lrow = 1 For sht = 1 To aWB.Sheets.Count If aWB.Sheets(sht).Name < aws.Name Then lrow = lrow + 1 Debug.Print aWB.Sheets(sht).Name aws.Cells(lrow, 1).Value = aWB.Sheets(sht).Name End If Next sht End Sub "Plinius" wrote: I have a workbook with a lot of worksheets and I would like to print a list of all these worksheet names, as at last count it was over 200 of them. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Printing worksheets tabs names
Excellent instructions! Very simple and easy to follow.
Thank you very much for your help. Margi EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I print worksheet tabs names from exel 2003
Hi Barb
Thank you for your time and advice. Most helpful. "Barb Reinhardt" wrote: Here's a quck and dirty macro. I know I've seen another posted on line, but can't find it now. To get to the VBA editor, type ALT F11 Then display the project explorer with CTRL R. Add a module using Insert Module and paste this into the module. Sub worksheetname() Dim aWB As Workbook Dim aws As Worksheet Set aWB = ActiveWorkbook Worksheets.Add.Name = "WorksheetList" Set aws = ActiveSheet Debug.Print aWB.Sheets.Count lrow = 1 For sht = 1 To aWB.Sheets.Count If aWB.Sheets(sht).Name < aws.Name Then lrow = lrow + 1 Debug.Print aWB.Sheets(sht).Name aws.Cells(lrow, 1).Value = aWB.Sheets(sht).Name End If Next sht End Sub "Plinius" wrote: I have a workbook with a lot of worksheets and I would like to print a list of all these worksheet names, as at last count it was over 200 of them. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing: how do I amend my print defaults? | Excel Discussion (Misc queries) | |||
Worksheet Names | Excel Discussion (Misc queries) | |||
In Excel, how do I change worksheet headers (A,B) to names (Box)? | New Users to Excel | |||
Hierarchical Worksheet Tabs??? New Excel feature? | Excel Discussion (Misc queries) | |||
Print addresses from an exel worksheet to envelopes | Excel Discussion (Misc queries) |