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: 4
Default Date update only on action????

This is a small issue that has been pestering me for a few days now. I
had a request to add "Last Update: date" to the header in a report.
Actually there are three different reports on three different
worksheets in one workbook that are being used. These three reports
have some VBA associated with a command button click that refreshes
them when the button is clicked. I thought that I could just append
the current date to the header inside the button click action, but the
date keeps advancing to the current date. So, this morning when I
opened the report and did a print preview the date was today's date,
and I know that the report wasn't updated since yesterday.

Below is the what I am currently doing. Initially the function below
was a procedure that read in the current sheet name and just added the
text to the header inside of the procedure to whatever sheet was
given. This did the same thing so I thought that if I assign the value
to a variable and then just manually print the variable text to the
header there would be no way that it could automatically update ......
this is frustrating, please help.

Thanks in advance.

Public Function LastUpdatedToHeader()

LastUpdatedToHeader = "Last Updated: &D"

End Function
'''Then call inside button click action like...
Dim updatedLast as String
updatedLast = LastUpdatedToHeader()
ActiveSheet.PageSetup.LeftHeader = updatedLast

 
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
Return date of an action Ben Kelly[_2_] Excel Discussion (Misc queries) 0 May 27th 10 10:51 PM
Return date of an action Jacob Skaria Excel Discussion (Misc queries) 0 May 27th 10 10:37 PM
Return date of an action Jacob Skaria Excel Discussion (Misc queries) 0 May 27th 10 10:13 PM
Return date of an action Ben Kelly Excel Discussion (Misc queries) 0 May 27th 10 09:15 PM
Excell copy action pauses for 15 second for the smallest action Meekal Excel Discussion (Misc queries) 1 January 28th 10 04:30 PM


All times are GMT +1. The time now is 06:01 AM.

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

About Us

"It's about Microsoft Excel"