Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Auto run macro when file is saved

Hi,
Is there a way to auto run a macro everytime a file is saved? I am using the
code below to add a revision date into the footer. I need this to execute
every time the file is saved.
Thanks.

Function MyDate()
Application.Volatile
MyDate = FileDateTime(ThisWorkbook.FullName)
End Function

Sub setfooterfromrange()

With ActiveSheet.PageSetup
ActiveWorkbook.Save
.LeftFooter = "Revision Date: " & Format(Range("z64"), "Dddd, Mmmm dd,
yyyy, h:mm AM/PM")

End With
Reply
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
Macro saved .xls file is not opening in 2007 Vinod Excel Discussion (Misc queries) 2 July 8th 09 06:23 PM
HOW DO I AUTO NAME A SAVED FILE FROM A SPEC. BLOCK IN EXCEL? bbrinker Excel Discussion (Misc queries) 8 December 16th 08 11:01 PM
How do I recover a file not saved - auto reboot? publishing in phoenix Excel Discussion (Misc queries) 0 June 13th 07 03:10 PM
Excel auto opens last saved file. Ducky Excel Discussion (Misc queries) 1 September 9th 05 07:20 PM
File saved as cell entry macro xyzer Excel Programming 1 September 1st 05 09:44 PM


All times are GMT +1. The time now is 04:56 PM.

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"