Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing: how do I amend my print defaults? joo Excel Discussion (Misc queries) 7 September 21st 06 02:00 PM
Worksheet Names Timmy Mac1 Excel Discussion (Misc queries) 3 August 22nd 06 10:24 AM
In Excel, how do I change worksheet headers (A,B) to names (Box)? Tom McGuire New Users to Excel 4 January 18th 06 05:39 PM
Hierarchical Worksheet Tabs??? New Excel feature? JMcC Excel Discussion (Misc queries) 1 October 11th 05 04:46 PM
Print addresses from an exel worksheet to envelopes Sherry Lee Excel Discussion (Misc queries) 4 September 22nd 05 12:21 AM


All times are GMT +1. The time now is 04:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"