Sequence of events in Excel ComboBox

%3CLINGO-SUB%20id%3D%22lingo-sub-191973%22%20slang%3D%22en-US%22%3ESequence%20of%20events%20in%20Excel%20ComboBox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-191973%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20puzzled%20why%20the%20Change%20and%20CLick%20events%20are%20fired%20in%20reverse%20order%2C%20in%20an%20Excel%20ComboBox.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20a%20situation%3A%3C%2FP%3E%3CP%3EI%20have%20a%20ComboBox%20containing%20a%20list%20of%20items.%20In%20order%20to%20select%20one%20I%20click%20on%20the%20drop-down%20button%2C%20and%20then%20click%20on%20an%20entry%20in%20the%20list.%20At%20that%20point%20the%20entry%20is%20transferred%20to%20the%20text-box%20area%20of%20the%20control.%20So%20I've%20done%20two%20clicks.%20The%20events%20I%20would%20expect%20to%20see%20would%20be%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDropButtonClick%3C%2FP%3E%3CP%3EClick%3C%2FP%3E%3CP%3EChange%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstead%2C%20what%20happens%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDropButtonCLick%3C%2FP%3E%3CP%3EChange%3C%2FP%3E%3CP%3EClick%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20no%20member%20which%20allows%20the%20Change%20event%20to%20indicate%20that%20it%20has%20happened%20as%20part%20of%20an%20earlier%20Click.%20Of%20course%2C%20if%20you%20processed%20them%20in%20the%20order%20which%20I%20believe%20to%20be%20more%20sensible%2C%20then%20the%20simple%20fact%20of%20the%20Click%20event%20would%20allow%20me%20to%20save%20that%20event%2C%20and%20modify%20the%20processing%20in%20the%20Change%20event.%20(How%20much%20more%20wonderful%20if%20the%20ComboBox%20itself%20indicated%20the%20state%20of%20the%20list%2C%20which%20is%20really%20what%20we%20need%20to%20get).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHas%20anyone%20else%20experienced%20this%20problem%3F%20And%20if%20so%2C%20how%20have%20you%20solved%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETony%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-191973%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1376768%22%20slang%3D%22en-US%22%3ERe%3A%20Sequence%20of%20events%20in%20Excel%20ComboBox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1376768%22%20slang%3D%22en-US%22%3EI%20am%20facing%20one%20issue%20with%20height%20of%20list%20for%20combobox%20in%20excel%20vba%20forms.%20When%20I%20am%20assigning%20the%20rowsource%20as%20a%20dynamic%20list%2C%20with%20offset%20function%2C%20the%20list%20height%20is%20coming%20fine%2C%20however%20not%20sure%2C%20how%20can%20I%20fix%20the%20height%20of%20a%20static%20list%2C%20where%20we%20mention%20the%20rowsource%2C%20in%20the%20combobox%20properties%20while%20designing%20the%20form.%20I%20want%20user%20to%20not%20to%20get%20an%20option%20to%20scroll%20further%20after%20the%20actual%20list%20values.%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

I'm puzzled why the Change and CLick events are fired in reverse order, in an Excel ComboBox.

 

Here's a situation:

I have a ComboBox containing a list of items. In order to select one I click on the drop-down button, and then click on an entry in the list. At that point the entry is transferred to the text-box area of the control. So I've done two clicks. The events I would expect to see would be:

 

DropButtonClick

Click

Change

 

Instead, what happens is:

 

DropButtonCLick

Change

Click

 

There is no member which allows the Change event to indicate that it has happened as part of an earlier Click. Of course, if you processed them in the order which I believe to be more sensible, then the simple fact of the Click event would allow me to save that event, and modify the processing in the Change event. (How much more wonderful if the ComboBox itself indicated the state of the list, which is really what we need to get).

 

Has anyone else experienced this problem? And if so, how have you solved it?

 

Thanks,

 

Tony

1 Reply
Highlighted
I am facing one issue with height of list for combobox in excel vba forms. When I am assigning the rowsource as a dynamic list, with offset function, the list height is coming fine, however not sure, how can I fix the height of a static list, where we mention the rowsource, in the combobox properties while designing the form. I want user to not to get an option to scroll further after the actual list values.