LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default keeping a print header tied to a worksheet cell current

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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to undo scrolling tied to a single cell Tom Excel Worksheet Functions 1 February 23rd 10 03:01 PM
How do I get '&' to print within the Header of a Excel Worksheet? Denise M. Excel Discussion (Misc queries) 2 February 9th 10 06:01 PM
Sum Every 4th column in a range tied to a control cell [email protected] Excel Worksheet Functions 4 August 19th 08 03:41 PM
I want a title to print on every page of a worksheet; not a header DeltaPearl Excel Discussion (Misc queries) 2 February 2nd 06 05:43 PM
How do I choose a cell colour, without it being tied to the data? Matt-e-gee Excel Discussion (Misc queries) 3 November 18th 05 08:22 PM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"