excel vba - Temporarily disabling VBA's worksheet_change() -


i have vba macro need run initialise monthly data dump of raw data. works fine.

in addition, have private sub worksheet_change() step runs each time cell's value changed. works fine.

my issue initialisation macro makes many changes, keeps firing off private sub worksheet_change(). there way can have disabled until after initialisation has finished running?

you must temporarily disabile eventi with

application.enableevents = false

and set true initializing macro end

to ensure set you'd better settings inside initializing macro , use error handler, follows:

sub initializingmacro ()      on error goto errhandler     application.enableevents = false      'your code here...  errhandler:    application.enableevents = true  end sub 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -