R Ryan H Mar 5, 2009 #1 Is there a way to keep userform events from firing? I don't want my Combobox_Change Events firing when I click my command button.
Is there a way to keep userform events from firing? I don't want my Combobox_Change Events firing when I click my command button.
B Bernie Deitrick Mar 5, 2009 #2 Ryan, An easy way to control execution of code is to use a global boolean, and check that value for a state: Public boolUFEventsDisabled As Boolean Set it to true using some event, like the form load, or a button click: boolUFEventsDisabled = True Then at the top of all events, use If boolUFEventsDisabled Then Exit Sub and have some way to re-enable it... HTH, Bernie MS Excel MVP
Ryan, An easy way to control execution of code is to use a global boolean, and check that value for a state: Public boolUFEventsDisabled As Boolean Set it to true using some event, like the form load, or a button click: boolUFEventsDisabled = True Then at the top of all events, use If boolUFEventsDisabled Then Exit Sub and have some way to re-enable it... HTH, Bernie MS Excel MVP