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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -