Setting PageSetup properties is very slow...


Posted by Olivier on January 11, 2001 8:31 AM

Hi

When I set all the PageSetup properties in a VBA Macro, this takes a very long time to proceed each property.
I am working with Excel 97 SR-2 under Windows 95.

If someone could help, I will appreciate.

Bye

Olivier

Posted by Celia on January 11, 2001 6:54 PM

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

Posted by Doug Stubbs on January 22, 2001 2:28 PM

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!



Posted by Celia on January 23, 2001 2:14 AM

Re: Variable name in Custom Header?

Doug
Try this :-

Dim locationname$
locationname = "Location"
ActiveSheet.PageSetup.CenterHeader = locationname & " MTD"

Celia