Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
roadkill
 
Posts: n/a
Default Events won't Disable!

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Events won't Disable!

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

roadkill wrote:

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


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
roadkill
 
Posts: n/a
Default Events won't Disable!

Thanks - that worked just fine. What events DOES the EnableEvents setting
affect?

"Dave Peterson" wrote:

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

roadkill wrote:

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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Query Refresh warning dialog box in Excel 2003 Jeff Koons Excel Discussion (Misc queries) 2 December 1st 05 04:08 PM
Disable Customize toolber tabs areddy Excel Discussion (Misc queries) 1 October 21st 05 02:43 PM
disable customize option when right click on menu bar areddy Excel Discussion (Misc queries) 0 October 20th 05 09:14 AM
Running Excel events even in edit mode.... Ishika Excel Discussion (Misc queries) 0 June 16th 05 06:53 PM
Outlook 2003 calendar events into Excel 2003? Kolin Tregaskes Excel Discussion (Misc queries) 4 January 31st 05 07:30 AM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"