Export the Contents list in `File Properties´ box

G

Gregory

How can one export or save the Contents list (on the `Contents´ tab)
of the File Properties box? I have dozens of DATA and Chart worksheets
present and would like to export for an `index´.

-G
 
G

Gord Dibben

Gregory

If you want a list of the worksheets and chartsheets in a workbook............

Insert a new sheet then run this macro.

Private Sub ListSheets()
'list of sheet names starting at A1
Dim rng As Range
Dim i As Integer
Set rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(i, 0).Value = Sheet.Name
i = i + 1
Next Sheet
End Sub


Gord Dibben MS Excel MVP
 
G

Gord Dibben

Sorry about that Gregory. I usually post this along with the code but too much
hurry this AM

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..........

First...create a backup copy of your original workbook.

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 Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.


Gord
 
G

Gregory

Sorry about thatGregory. I usually post this along with the code but toomuch
hurry this AM

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..........

First...create a backup copy of your original workbook.

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 Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.

Gord

Hi.. and thank for this info.

I followed it `to the letter´ however the Macro doesn't show up
ANYWHERE in the Macro list when trying to run it. There doesn't seem
to be any syntax errors and the security is set to medium. It should
be easier that this!! :))

Please advise...

-Gregory
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top