R
Ross Culver
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
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