Events won't Disable!

R

roadkill

I have 2 combo boxes on the same sheet and both have Combobox_Change() event
code associated with them. This code resides in the sheet object (same
sheet) and both macros call other routines in a module in this same
spreadsheet file. When one of these events fires, I want to inhibit the
other from firing while the first's code is executing. I've tried using
Application.EnableEvents = False, but it's just ignored. Does anyone know
why this would be?

Thanks,
Will
 
D

Dave Peterson

Changes to these controls aren't affected by application.enableevents settings
(as you've seen).

But you could do the same sort of thing...

Dim BlkProc as boolean

private sub combobox1_change()
if blkproc = true then exit sub
'rest of your code here
end sub



private sub combobox2_change()
if blkproc = true then exit sub
'rest of your code here
blkproc = true
'some code that would cause combobox1_change to fire
blkproc = false

end sub
 
Top