P
Paul James
I'm using the Workbook_BeforePrint event to place a value from a worksheet
cell in a print header. The cell is located in a different worksheet from
the one that contains the print range, and I'm using an expression of the
form
With ActiveSheet.PageSetup
.CenterHeader = ""
.LeftHeader = Worksheets("Sheet1").Range("Range1")
End With
This woks fine except for one problem: This code doesn't always update the
print header with the most current values in Range1. Even if I save the
workbook after making the change in Range1, the printed page doesn't reflect
the change right away, and prints the previous value that was in Range1.
The one thing I noticed that causes the latest change to appear in the
printout is if I go into Print Preview before printing the page. In that
case, Print Preview seems to somehow update the process so that when I print
out the hard copy, I've got the current data.
It almost seems like there's some kind of a buffer somewhere for print
settings, which isn't getting cleared until some other event like Print
Preview occurs. Does anyone know what I can do to get my headers to reflect
the current values in the referenced cell without having to open Print
Preview first?
Thanks in advance.
Paul
cell in a print header. The cell is located in a different worksheet from
the one that contains the print range, and I'm using an expression of the
form
With ActiveSheet.PageSetup
.CenterHeader = ""
.LeftHeader = Worksheets("Sheet1").Range("Range1")
End With
This woks fine except for one problem: This code doesn't always update the
print header with the most current values in Range1. Even if I save the
workbook after making the change in Range1, the printed page doesn't reflect
the change right away, and prints the previous value that was in Range1.
The one thing I noticed that causes the latest change to appear in the
printout is if I go into Print Preview before printing the page. In that
case, Print Preview seems to somehow update the process so that when I print
out the hard copy, I've got the current data.
It almost seems like there's some kind of a buffer somewhere for print
settings, which isn't getting cleared until some other event like Print
Preview occurs. Does anyone know what I can do to get my headers to reflect
the current values in the referenced cell without having to open Print
Preview first?
Thanks in advance.
Paul