Hi Folks
Is there a way of changing the default template in Excel so that it will always put the file name, path and sheet name on in the Header/Footer section or is it necessary to record a macro to do this.
thanks
Shirley Munro![]()
Hi Folks
Is there a way of changing the default template in Excel so that it will always put the file name, path and sheet name on in the Header/Footer section or is it necessary to record a macro to do this.
thanks
Shirley Munro![]()
Hi Shirley,
You can insert the file name & the worksheet name using Page Setup > Header/Footer > Custom Header etc., however I don't think you can insert the file path without using VBA - there's no formula which tells you the path of your workbook.
Try inserting the following code in the "ThisWorkbook" VBA module of your workbook:
This will automatically insert the appropriate information in the page header of each worksheet before it is printed.![]()
Please Login or Register to view this content.
If you want it to appear in the footer instead/as well, just use "LeftFooter" instead of/as well as "LeftHeader".
Hope this helps - please let me know how you get on.
Best regards,
Greg M
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks