Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Event 1

Status
Not open for further replies.

cjac

Programmer
Dec 8, 2003
93
GB
Has anyone else found that Change events do not always fire off? I have just inserted some code into the change event of a combo box. When I run my app and select different options from the combo box - my code in the change event is not run. Any ideas why VB disregards this event?
 
you will probably be better off using the click event. this seems to fire when something is clicked in the list, the change events seems to fire only when something is typed in to the combo box.

Matt

If you can keep your head while those around you are losing theirs, you obviously haven't grasped the seriousness of the situation
 
It is documented:

"ComboBox — changes the text in the text box portion of the control. Occurs only if the Style property is set to 0 (Dropdown Combo) or 1 (Simple Combo) and the user changes the text or you change the Text property setting through code."

Selecting from the dropdown causes non-vb code to change the Text property, hence no Change event
 
Cheers Mat - that seems to work fine. I would have expected the change event code to fire when a value in the combo box is er...changed! Does this seem illogical? Seems a bit inconsistent to me! C'mon microsoft - sort it out!
 
Strongm - thanks for the documentation. Still seems a bit inconsistent though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top