» Adding the Path Address to the Header/Footer
CATEGORY - Excel Printing
VERSION - All Microsoft Excel Versions
To add the path to a header or footer:
1. Open the VBE (Visual Basic Editor) by pressing Alt+F11.
2. In the Project Explorer, double-click the ThisWorkbook Module.
3. From the Object dropdown list, select Workbook, and from the Procedure dropdown list, select BeforePrint (these two dropdown lists are at the top of the Module sheet).
4. In the Event procedure, between the automatically generated opening and closing statements, type the following code:
ActiveSheet.PageSetup.LeftFooter="&A&F&T&D" & ActiveWorkbook.Path
The letters A, F, T, D are the sheet name, workbook name, time, and date, respectively.
When using Excel 2002 and Excel 2003, the line of code will be shorter (Z is for the path address):
LeftFooter="&A&F&T&D&Z"

Book Store:
Recommended Books:
- Final Accounting: Ambition, Greed and the Fall of Arthur Andersen
- Quantitative Methods in Derivatives Pricing: An Introduction to Computational Finance
- Marketing Plans That Work, Targeting Growth and Profitability
- 422 Tax Deductions for Businesses and Self-Employed Individuals : You Get a Raise Every Time You Find a Legitimate Tax Deduction
- F1 Get the Most out of Excel! The Ultimate Excel tip Help Guide
- Excel Charts
No comments have been submitted.

