Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CenterHeader, RightHeader, LeftHeader
I have the following code:
With Worksheets("Report").PageSetup .RightHeader = xRightHeader .CenterHeader = xCenterHeader .LeftHeader = xLeftHeader End With The xVariables are defined and populated just prior to this code. I get the following error: Run-time error '1004' "Unable to set the LeftHeader property of the PageSetup class". If I swap the code around like this: With Worksheets("Report").PageSetup .RightHeader = xRightHeader .CenterHeader = xCenterHeader .LeftHeader = xLeftHeader End With I get: Run-time error '1004' "Unable to set the RightHeader property of the PageSetup class". If I remove either the right, the left or the center, the code works fine. Is there some kind of limitation that prevents us from setting all three of the headers? Ross |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enter Multiple lines using .leftheader | Excel Discussion (Misc queries) | |||
Using VBA to insert a multiple-row title in the CenterHeader | Excel Programming | |||
Setting LeftHeader / CenterHeader | Excel Programming | |||
Pagesetup. Is there no way to control the LeftMargin of the LeftHeader ? | Excel Programming | |||
Excel generation and PageSetup.CenterHeader | Excel Programming |