PDA

View Full Version : Solved: stops all other macros except this one



danovkos
04-19-2010, 04:56 AM
Hi all,
short question.
Is it possible with any command in vba stop all other macros during running this macro, where the commad is written?

i mean i have macro "main" but i have other macros, e.g. if something in sheets is changed "change", it write log , checking cells "checking" and other...

i want, if i run "main" it stops all other macros, whichg will be run..."change", "checking" and other..

thx for help

mdmackillop
04-19-2010, 05:21 AM
Application.EnableEvents = False


Remember to reset to true on completion. It is safer using it with Error Handling as it will not reset automatically.


Sub Test()
On Error GoTo Exits
Application.EnableEvents = False

'Do your stuff

Exits:
Application.EnableEvents = True
End sub

danovkos
04-19-2010, 05:32 AM
THANK you m8.
:thumb