bryanbayfield
Technical User
This has me rather perplexed.
I have a form with a number of controls on it - I am having problems with two in particular - a combobox (cmbVar) and a control button (cbuSetProp). When the cbuSetProp is clicked part of the code changes the value of the cmbVar. Since I have code for the cmbVarchange event that I do not want executing, I use Application.EnableEvents = False just before the code that will change cmbVar.
So, what happens when I step through the code - enable events is set to false and - whoah - the cmbVar change event fires.
I can't remember this happening to me before. As luck would have it I have a work around which means I can handle the cmbVar change event firing, but it's a tad worrying. can someone explain to me why this is happening - more as a point of interest than anything because as I say I have a workaround.
And someone get me Bill Gates on the line, please! I have a few choice words for him!
I have a form with a number of controls on it - I am having problems with two in particular - a combobox (cmbVar) and a control button (cbuSetProp). When the cbuSetProp is clicked part of the code changes the value of the cmbVar. Since I have code for the cmbVarchange event that I do not want executing, I use Application.EnableEvents = False just before the code that will change cmbVar.
So, what happens when I step through the code - enable events is set to false and - whoah - the cmbVar change event fires.
I can't remember this happening to me before. As luck would have it I have a work around which means I can handle the cmbVar change event firing, but it's a tad worrying. can someone explain to me why this is happening - more as a point of interest than anything because as I say I have a workaround.
And someone get me Bill Gates on the line, please! I have a few choice words for him!