PC Review


Reply
Thread Tools Rate Thread

Date update only on action????

 
 
gaba53@hotmail.com
Guest
Posts: n/a
 
      14th Mar 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      14th Mar 2007
&D says to print the current date.

Public Function LastUpdatedToHeader()

LastUpdatedToHeader = "Last Updated: " & format(Date,"mm/dd/yyyy")

End Function

--
Regards,
Tom Ogilvy


"(E-Mail Removed)" wrote:

> 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
>
>

 
Reply With Quote
 
gaba53@hotmail.com
Guest
Posts: n/a
 
      14th Mar 2007
Sounds easy enough. Thank you.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
filter by date and action Harry Microsoft Excel Discussion 1 19th Aug 2011 02:11 AM
RE: Return date of an action Jacob Skaria Microsoft Excel Misc 0 27th May 2010 10:37 PM
RE: Return date of an action Jacob Skaria Microsoft Excel Misc 0 27th May 2010 10:13 PM
RE: Return date of an action Ben Kelly Microsoft Excel Misc 0 27th May 2010 09:15 PM
set the date to be date of today when action successful is ticked =?Utf-8?B?RGF0YWJhc2UgVXNlcg==?= Microsoft Access Forms 2 19th Jul 2005 08:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:47 AM.