Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Solved: excel: displaying last save date


(!)

Servant1975's Avatar
Servant1975 Servant1975 is offline
Member with 168 posts.
THREAD STARTER
 
Join Date: Feb 2004
22-Feb-2006, 10:14 AM #1
Solved: excel: displaying last save date
I'm trying to have a header display the last updated date on a spreadsheet. I know how to display the current date, but that might be different from the last update date, which would basically be the last date the spreadsheet was saved. Is there a way to do this? Thanks
bomb #21's Avatar
Member with 8,268 posts.
 
Join Date: Jul 2005
Location: The void AKA edge of the Fens
Experience: I bent my wookie :(
22-Feb-2006, 10:23 AM #2
Try this in the ThisWorkbook module:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.PageSetup.CenterHeader = Format(Now, "dd-mm-yy hh:mm:ss")
End Sub
Servant1975's Avatar
Servant1975 Servant1975 is offline
Member with 168 posts.
THREAD STARTER
 
Join Date: Feb 2004
22-Feb-2006, 10:28 AM #3
Thank you, how do I get to the module, and would the rest of my header normally, or would this work as a footer.
bomb #21's Avatar
Member with 8,268 posts.
 
Join Date: Jul 2005
Location: The void AKA edge of the Fens
Experience: I bent my wookie :(
22-Feb-2006, 10:31 AM #4
1st part: rightclick the XL icon left of "File" in the menu bar, select "View Code".

2nd part: translation please.
Servant1975's Avatar
Servant1975 Servant1975 is offline
Member with 168 posts.
THREAD STARTER
 
Join Date: Feb 2004
22-Feb-2006, 10:43 AM #5
I have a header and want this to display with it. Using the update as a footer would work also. Would this work as a left aligned footer?
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = Format(Now, "dd-mm-yy hh:mm:ss")
End Sub
bomb #21's Avatar
Member with 8,268 posts.
 
Join Date: Jul 2005
Location: The void AKA edge of the Fens
Experience: I bent my wookie :(
22-Feb-2006, 10:44 AM #6
Maybe you mean:

ActiveSheet.PageSetup.CenterHeader = "Usual header. Last saved: " & Format(Now, "dd-mm-yy hh:mm:ss")

or:

ActiveSheet.PageSetup.CenterFooter = "Usual footer. Last saved: " & Format(Now, "dd-mm-yy hh:mm:ss")
Servant1975's Avatar
Servant1975 Servant1975 is offline
Member with 168 posts.
THREAD STARTER
 
Join Date: Feb 2004
22-Feb-2006, 10:51 AM #7
Thank you that works.
bomb #21's Avatar
Member with 8,268 posts.
 
Join Date: Jul 2005
Location: The void AKA edge of the Fens
Experience: I bent my wookie :(
22-Feb-2006, 11:00 AM #8
Quote:
Originally Posted by Servant1975
that works.
Yup, if you make it work. Of course, if "disable macros" is selected when opening the file ...

Enjoy anyways.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2