Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Running a macro "On Save"
Hi, Can anyone tell me how I can get a file to run a macro each time the file is saved. I know this is achievable but can't find how to do it. Thanks in advance for any assistance. -- heski ------------------------------------------------------------------------ heski's Profile: http://www.excelforum.com/member.php...o&userid=30581 View this thread: http://www.excelforum.com/showthread...hreadid=543201 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Running a macro "On Save"
Hello
Use this workbook event which fires before saving workbook : Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Not Cancel Then 'do your stuff here End If End Sub To acces this event either right-click on the Excel icon immediately situated left to th File Menu in Excel or open VB Editor and double-click on Thisworkbook HTH Cordially Pascal "heski" a écrit dans le message de news: ... Hi, Can anyone tell me how I can get a file to run a macro each time the file is saved. I know this is achievable but can't find how to do it. Thanks in advance for any assistance. -- heski ------------------------------------------------------------------------ heski's Profile: http://www.excelforum.com/member.php...o&userid=30581 View this thread: http://www.excelforum.com/showthread...hreadid=543201 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Running a macro "On Save"
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.Run "PutYourMacroNameHere" End Sub Vaya con Dios, Chuck, CABGx3 "heski" wrote: Hi, Can anyone tell me how I can get a file to run a macro each time the file is saved. I know this is achievable but can't find how to do it. Thanks in advance for any assistance. -- heski ------------------------------------------------------------------------ heski's Profile: http://www.excelforum.com/member.php...o&userid=30581 View this thread: http://www.excelforum.com/showthread...hreadid=543201 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running Macro minimises window | Excel Discussion (Misc queries) | |||
Macro Help In Excel | Excel Discussion (Misc queries) | |||
Macro running when a cell is exited | Excel Discussion (Misc queries) | |||
Macro running problem | Excel Discussion (Misc queries) | |||
Running VBA Macro | Excel Discussion (Misc queries) |