SOLVED
Home

Creating a contents page

%3CLINGO-SUB%20id%3D%22lingo-sub-758584%22%20slang%3D%22en-US%22%3ECreating%20a%20contents%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758584%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20creating%20a%20report%20on%20excel%20and%20want%20to%20add%20a%20contents%20page.%20I%20have%20numbered%20the%20page%20with%20'page%201.....%20'page%20n'%20footer.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20show%20the%20page%20number%20that%20relate%20to%20the%20different%20pages%2C%20currently%20i'm%20just%20manually%20inputting%20them%2C%20but%20once%20I%20add%20to%20a%20sheet%20and%20a%20new%20page%20is%20needed%20I%20need%20to%20go%20back%20and%20change%20it%20all.%20Is%20there%20a%20way%20for%20the%20numbers%20to%20show%20and%20change%20relating%20to%20the%20page%20numbers%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBailey100%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-758584%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-758613%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20contents%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758613%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F351100%22%20target%3D%22_blank%22%3E%40Bailey100%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHi%3C%2FP%3E%0A%3CP%3EAttached%20is%20an%20extract%20from%20what%20I%20use%20for%20my%20clients.%3C%2FP%3E%0A%3CP%3EIf%20you%20insert%20the%20sheet%20TOC%20into%20your%20file%2C%20and%20copy%20across%20the%20code%20in%20Module%201%20to%20your%20file%2C%20then%20this%20should%20do%20what%20you%20want.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-758662%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20contents%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758662%22%20slang%3D%22en-US%22%3EHi%3CBR%20%2F%3E%3CBR%20%2F%3EThanks!%20How%20do%20I%20go%20about%20copying%20across%20the%20code%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-758743%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20a%20contents%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758743%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F351100%22%20target%3D%22_blank%22%3E%40Bailey100%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHi%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirstly%20apologies%2C%20but%20the%20file%20I%20sent%20you%20was%20password%20protected%20for%20the%20VBA.%20The%20attached%20file%20is%20an%20unprotected%20copy%20so%20use%20that%20one%20instead.%3C%2FP%3E%0A%3CP%3EWith%20both%20your%20workbook%20open%20and%20my%20latest%20file%20open.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPress%20F11%20to%20invoke%20the%20VB%20Editor%20and%20you%20will%20see%20the%20Project%20Explorer%20with%20your%20files%20in%20the%20left%20hand%20pane%20and%20you%20will%20see%20the%20module%20called%20mod_Tech4u.%3C%2FP%3E%0A%3CP%3EJust%20drag%20it%20up%20(or%20down)%20to%20your%20file%20and%20a%20copy%20will%20be%20created%20there.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPress%20Alt%2BF11%20to%20return%20back%20to%20Excel%20and%20then%20save%20your%20file%20but%20remember%20to%20save%20it%20as%20a%20.xlsm%20or%20a%20.xlsb%20file%20in%20order%20for%20the%20code%20to%20be%20saved.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Bailey100
Contributor

Hi,

 

I'm creating a report on excel and want to add a contents page. I have numbered the page with 'page 1..... 'page n' footer.

 

How can I show the page number that relate to the different pages, currently i'm just manually inputting them, but once I add to a sheet and a new page is needed I need to go back and change it all. Is there a way for the numbers to show and change relating to the page numbers?

 

Many thanks,

 

Bailey100

3 Replies

@Bailey100 

Hi

Attached is an extract from what I use for my clients.

If you insert the sheet TOC into your file, and copy across the code in Module 1 to your file, then this should do what you want.

 

 

Hi

Thanks! How do I go about copying across the code?

Solution

@Bailey100 

Hi

 

Firstly apologies, but the file I sent you was password protected for the VBA. The attached file is an unprotected copy so use that one instead.

With both your workbook open and my latest file open.

 

Press F11 to invoke the VB Editor and you will see the Project Explorer with your files in the left hand pane and you will see the module called mod_Tech4u.

Just drag it up (or down) to your file and a copy will be created there.

 

Press Alt+F11 to return back to Excel and then save your file but remember to save it as a .xlsm or a .xlsb file in order for the code to be saved.

 

Related Conversations