View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JK JK is offline
external usenet poster
 
Posts: 9
Default Retain Original Date in Page Header

Maybe this will work for you:

..CenterHeader = "CONFIRM REPORT FOR " & Date

This should place the date into the header as a string so it won't be
automatically updated by excel the next time it is opened.

-JK

SITCFanTN wrote:
I dowload a report each day and run a complex macro that creates a dozen or
so worksheets, each worksheet has a page header. The page header is the Name
of the report for example, "Confirm Report" with the current date. My code is

.CenterHeader = "CONFIRM REPORT FOR &D"

My problem is each time the report is opened, it displays the current date
in the page header, I don't want that, I want it to retain the original date
reguardless of when it is viewed.

As I was scanning previous posts, I saw where someone was advised use
"today" but then somebody else said that would not retain the original date.
I just want to clarify that if I use this code, my date will not change each
time the report is opened, it will retain the original date when the report
was created. Thanks

.CenterHeader = "CONFIRM REPORT FOR today()"