Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Britomart
 
Posts: n/a
Default How do I print out a list of the tabs in an Excel workbook?

I have a large workbook that tracks computers for a company I work for, one
tab per computer. I would like to print out jsut a list of the tab names as
sort of an index file and check list for a physical inventory. Is this
possible?

thanks
  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default How do I print out a list of the tabs in an Excel workbook?

This macro will list all the sheet names in order in Column A of the active
sheet, starting in A2. Column A must be empty for this to work. HTH Otto
Sub ListShtNames()
Dim ws as Worksheet
For Each ws In ActiveWorkbook.Worksheets
Range("A" & Rows.Count).End(xlUp).Offset(1).Value = ws.Name
Next ws
End Sub
"Britomart" wrote in message
...
I have a large workbook that tracks computers for a company I work for, one
tab per computer. I would like to print out jsut a list of the tab names
as
sort of an index file and check list for a physical inventory. Is this
possible?

thanks



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default How do I print out a list of the tabs in an Excel workbook?

How about just add the worksheet names to a worksheet and then print that?

Option Explicit
Sub testme()

Dim rptWks As Worksheet
Dim wks As Worksheet
Dim ActWkbk As Workbook
Dim oRow As Long

Set ActWkbk = ActiveWorkbook

Set rptWks = Workbooks.Add(1).Worksheets(1)

oRow = 0
For Each wks In ActWkbk.Worksheets
oRow = oRow + 1
rptWks.Cells(oRow, "A").Value = "'" & wks.Name
Next wks

End Sub


If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Britomart wrote:

I have a large workbook that tracks computers for a company I work for, one
tab per computer. I would like to print out jsut a list of the tab names as
sort of an index file and check list for a physical inventory. Is this
possible?

thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary Hallawell
 
Posts: n/a
Default How do I print out a list of the tabs in an Excel workbook?

Hi Otto

Thanks a lot - it was exactly what I was looking for.

"Otto Moehrbach" wrote:

This macro will list all the sheet names in order in Column A of the active
sheet, starting in A2. Column A must be empty for this to work. HTH Otto
Sub ListShtNames()
Dim ws as Worksheet
For Each ws In ActiveWorkbook.Worksheets
Range("A" & Rows.Count).End(xlUp).Offset(1).Value = ws.Name
Next ws
End Sub
"Britomart" wrote in message
...
I have a large workbook that tracks computers for a company I work for, one
tab per computer. I would like to print out jsut a list of the tab names
as
sort of an index file and check list for a physical inventory. Is this
possible?

thanks




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
In Excel, how can I print a long list on 1 page in multiple colum. Chuck Excel Discussion (Misc queries) 3 March 23rd 05 06:46 PM
How do I print all sheets of an Excel workbook from explorer? Dave Walker Excel Discussion (Misc queries) 1 January 28th 05 09:19 PM
How do I print grayscale font in Excel 2003? NKT Excel Discussion (Misc queries) 0 January 26th 05 04:51 PM
I can I set up Excel to print all sheets of a workbook as a defau. Homebody Excel Discussion (Misc queries) 1 January 14th 05 10:26 PM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM


All times are GMT +1. The time now is 03:44 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"