http://dmcritchie.mvps.org/excel/buildtoc.htm
Edit Macro in Excel
How to use:
Copy above code.
In Excel press Alt + F11 to enter the VBE.
Press Ctrl + R to show the Project Explorer.
Right-click desired file on left.
Choose Insert -Module.
Paste code into the right pane.
Press Alt + Q to close the VBE.
Save workbook before any other changes.
Press Alt + F8, select 'CreateTOC', press Run.
Test the code:
From an existing workbook, save first.
Press Alt + F8.
Choose 'CreateTOC'.
Press 'Run'.
TOC sheet will be the left-most sheet added in your workbook.
Wednesday, February 15, 2012
table of content in macro
Posted by AG at 9:26 PM
Labels: Excel, Force user to enable macro in Excel, TOC
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment