ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can't get list in Document Contents for workwheet (https://www.excelbanter.com/excel-worksheet-functions/45461-cant-get-list-document-contents-workwheet.html)

Allan H.

Can't get list in Document Contents for workwheet
 
In any given worksheet, in File - Properties, there is a Contents tab. On
this tab is a list of the worksheets within the workbook. Is there any way
to get a list of these without having to do a manual copy/paste from each
tab, or scroll through the tabs to get what the names are? It seems very
simple as the information is there, but I can't figuer out how to get to it.

Gord Dibben

Allan

The only way I know is to use a macro to list the sheets onto a worksheet.


Sub ShowNames()
'list of sheet names in a workbook - placed on a new worksheet
Set wkbkToCount = ActiveWorkbook
iRow = 1
With Sheets.Add
For Each ws In wkbkToCount.Worksheets
.Rows(iRow).Cells(1).Value = ws.Name
iRow = iRow + 1
Next
End With
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the above code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.


Gord Dibben Excel MVP

On Wed, 14 Sep 2005 12:01:31 -0700, "Allan H." <Allan
wrote:

In any given worksheet, in File - Properties, there is a Contents tab. On
this tab is a list of the worksheets within the workbook. Is there any way
to get a list of these without having to do a manual copy/paste from each
tab, or scroll through the tabs to get what the names are? It seems very
simple as the information is there, but I can't figuer out how to get to it.




All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com