View Full Version : Solved: Unwanted Events firing
JKwan
03-03-2009, 10:21 AM
I've 2 combo boxes on my SS. Both have on Change events assoicated with them. When the SS loads up, I reset the comboboxes, but the Change events fires - which I don't want. I thought by using Application.EnabledEvents = false would stop the events from happening, but it does not. Is there a way to turn the events off? Right now, I am using a boolean to trap it and prevent my procedures from running, not elegant but it works.
Thank you.
Bob Phillips
03-03-2009, 10:48 AM
No, you have to roll your own.
Create a boolean variable that you set at the start and unset at the end, bypassing the event if it is already set.
JKwan
03-03-2009, 10:50 AM
No, you have to roll your own.
Crete a boolean variable that you set at the start and unset at the end, bypassing the event if it is already set.
That's what I did, thanks for the confirmation. So, what does Application.EnableEvents do anyway?
Bob Phillips
03-03-2009, 11:28 AM
It works on Excel applications, a combobox is a forms control, which is part of MSForms library.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.