Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.setup
|
|||
|
|||
list all worksheets in a workbook w/o manually typing
I want to create a list of all the worksheets in one workbook, "table of
contents". The table of contents for a report - basically listing all departments (that's what the tabs are) I know there is an indexing function, but I don't know how to use it for indexing or listing worksheets. |
#2
Posted to microsoft.public.excel.setup
|
|||
|
|||
list all worksheets in a workbook w/o manually typing
Danielle, here is one way, you might also want to have a look here
http://www.mvps.org/dmcritchie/excel/buildtoc.htm Sub TOC() 'will add a sheet, name it Worksheet Names 'and list all sheets in the workbook Dim ws As Worksheet, n As Integer n = 2 With Worksheets.Add .Name = "Worksheet Names" .Move befo=Worksheets(1) End With For Each ws In ActiveWorkbook.Worksheets If ws.Name < "Worksheet Names" Then Sheets("worksheet Names").Range("a" & n) = ws.Name n = n + 1 End If Next End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Danielle HR" <Danielle HR @discussions.microsoft.com wrote in message ... I want to create a list of all the worksheets in one workbook, "table of contents". The table of contents for a report - basically listing all departments (that's what the tabs are) I know there is an indexing function, but I don't know how to use it for indexing or listing worksheets. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protecting all worksheets of a workbook | Excel Discussion (Misc queries) | |||
Protect Workbook vs Worksheet?? | Excel Worksheet Functions | |||
Appending external worksheets into existing workbook? | Links and Linking in Excel | |||
How do I build a workbook from the worksheets another workbook? | Excel Discussion (Misc queries) | |||
How do I sum values from different worksheets within one workbook. | Excel Worksheet Functions |