Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Save As Event

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Save As Event

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Save As Event

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Save As Event

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
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
Example After Save Event Steph[_6_] Excel Programming 4 October 27th 05 01:42 AM
After Save Event help Steph[_3_] Excel Programming 2 June 27th 05 07:00 PM
Don't save before close event? Don Wiss Excel Programming 1 September 18th 04 01:51 AM
save as event scrabtree23 Excel Programming 1 October 5th 03 10:14 PM
After save event Bart[_3_] Excel Programming 2 July 22nd 03 12:07 PM


All times are GMT +1. The time now is 08:23 AM.

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"