View Single Post
  #4   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