Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My save as event:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.Run "MyFile.xls!MyMacro" End Sub No longer fires on save. The macro exists and will run from a hot key. What could have changed that it will not run on save? Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sounds like it is not in the ThisWorkbook code module.
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "Sandy" wrote in message ... My save as event: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.Run "MyFile.xls!MyMacro" End Sub No longer fires on save. The macro exists and will run from a hot key. What could have changed that it will not run on save? Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anywhere in your world do you have code that disables events? if so then
possibly your code errored out and the events were nort re-enabled, or you were debugging and exited exectuion prior to re-eneabling or there is an issue where you just neglect to re-enable the events. In any case jsut run this code to reset your events... sub test application.enableevents = true end sub Now your events should be firing again. As always when you play with these settings make sure your errorhandling is bullet proof and that your progarm flow always resets the changes you make. -- HTH... Jim Thomlinson "Sandy" wrote: My save as event: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.Run "MyFile.xls!MyMacro" End Sub No longer fires on save. The macro exists and will run from a hot key. What could have changed that it will not run on save? Thanks! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That got it thanks!!!
"Jim Thomlinson" wrote: Anywhere in your world do you have code that disables events? if so then possibly your code errored out and the events were nort re-enabled, or you were debugging and exited exectuion prior to re-eneabling or there is an issue where you just neglect to re-enable the events. In any case jsut run this code to reset your events... sub test application.enableevents = true end sub Now your events should be firing again. As always when you play with these settings make sure your errorhandling is bullet proof and that your progarm flow always resets the changes you make. -- HTH... Jim Thomlinson "Sandy" wrote: My save as event: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.Run "MyFile.xls!MyMacro" End Sub No longer fires on save. The macro exists and will run from a hot key. What could have changed that it will not run on save? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Example After Save Event | Excel Programming | |||
After Save Event help | Excel Programming | |||
Don't save before close event? | Excel Programming | |||
save as event | Excel Programming | |||
After save event | Excel Programming |