LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Disabling events within an event handler

Hi,

I have 2 comboboxes created from the Control Toolbox. I want to set
the text of one combobox when the other is clicked. Here's a sample
code for the Change event for them. (line numbers are given for easy
reference - they dont exist in the code)

1 private sub Combobox1_Change()
2 do stuff
3 Combobox2.Text = "something"
4 end sub
5
6 private sub Combobox2_change()
7 do stuff
8 Combobox1.Text = "the other thing"
9 end sub

In the above, when Combobox1_Change() is executing, I do not want it
to go to Combobox2_change()... This is happening. I then replaced
line 3 with the following:
Application.EnableEvents = False
Combobox2.Text = "something"
Application.EnableEvents = True

Well, the problem continues. I tired other things like setting
Combobox1.Application.Events flag. Same result. It just does not
seem to ignore the Change event for Combobox2.

How do I make this happen?

Thanks a lot for any pointers & Best Regards,
-feltra

 
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
Save Event Handler Spencer Excel Programming 1 February 24th 07 02:42 PM
Event handler VBA Noob[_4_] Excel Programming 4 April 26th 06 03:49 PM
Disabling Events Patrick Simonds Excel Programming 3 October 5th 05 12:35 PM
Global event handler?? [email protected] Excel Programming 1 October 23rd 04 05:31 PM
Disabling Events MWE[_28_] Excel Programming 4 February 6th 04 05:39 AM


All times are GMT +1. The time now is 09:57 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"