What event is triggered when user selects value from drop down ComboBox (ActiveX)?

孤者浪人 提交于 2019-12-19 09:52:57

问题


What event is triggered when user selects value from drop down ComboBox (Active X). How it can be defined in VBA. I would like to trigger macro when value is selected from drop down.


回答1:


ComboBox_Click() is the event you are looking for.




回答2:


If you're using a ComboBox control in a UserForm, it usually have an AfterUpdate Event.
If you're using an ActiveX Control ComboBox in a Sheet, you can try LostFocus Event.

Private Sub ComboBox1_LostFocus()

End Sub

This way, you can type in values and then run the routine after you select another object.



来源:https://stackoverflow.com/questions/29362456/what-event-is-triggered-when-user-selects-value-from-drop-down-combobox-activex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!