Olivier
It's much quicker to use XL4 macro language to do this. For example, to set a header & footer :-
Application.ExecuteExcel4Macro ("PAGE.SETUP(""&C Heading"",""Page &P"")")
Download MACROFUN.EXE to find out the XL4 macro syntax to fit your requirements. Can be downloaded from :-
http://support.microsoft.com/support/kb/articles/Q128/1/85.asp
Celia
Re: Variable name in Custom Header?
I felt as though my question related this so i hope someone will help me answer it.
How can i set a header with the variable name "locationname$" and the text "MTD" in the header so that it will look like "Location MTD". If you have any suggestions please let me know. Thanks!
Re: Variable name in Custom Header?
Doug
Try this :-
Dim locationname$
locationname = "Location"
ActiveSheet.PageSetup.CenterHeader = locationname & " MTD"
Celia