PDA

View Full Version : [SOLVED] Stop WorksheetChange Event



jmenche
02-14-2007, 01:35 PM
Howdy,

I have a macro that copies a bunch of data into a sheet. It will be used over and over. I also have a worksheetchange event to handle sorting after the data is copied in. However, I wrote the worksheetchange event with a static data set. Now, when I run the macro, the worksheetchange event fires in the middle and screws up the macro. Can I turn the event off until the macro is done??

:beerchug:

Bob Phillips
02-14-2007, 01:43 PM
Post the code.

johnske
02-14-2007, 02:41 PM
Put Application.EnableEvents = False at the start of your macro code and Application.EnableEvents = True at the end of it (make sure you have error-handling in your macro so that events are re-enabled if an error occurs in it)

jmenche
02-15-2007, 07:35 AM
Thanks Johnske. I knew it was something like that.