Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look in the ThisWorkbook moduleworkbookBeforeSave
-- Don Guillett Microsoft MVP Excel SalesAid Software "Rob" wrote in message ... 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro saved .xls file is not opening in 2007 | Excel Discussion (Misc queries) | |||
HOW DO I AUTO NAME A SAVED FILE FROM A SPEC. BLOCK IN EXCEL? | Excel Discussion (Misc queries) | |||
How do I recover a file not saved - auto reboot? | Excel Discussion (Misc queries) | |||
Excel auto opens last saved file. | Excel Discussion (Misc queries) | |||
File saved as cell entry macro | Excel Programming |