Forum Discussion
Anggie
Sep 04, 2019Copper Contributor
VBA Drop Down List
Hi Everyone, I developed a combo box drop down list and added a code that works fine but doesn’t let me scroll down my listed options using my down arrow keyboard button. Is there a code to use the d...
Subodh_Tiwari_sktneer
Sep 10, 2019Silver Contributor
I am not sure what exactly you are trying to do.
All I can suggest is, disable all the codes for ComboBox1 and have only one code which should be as below to set the ListFillRange once the ComboBox gets focus.
Private Sub ComboBox1_GotFocus() ComboBox1.ListFillRange = "DropDownListv1" End Sub
And then see if your ComboBox starts behaving normal and then think of adding other codes for ComboBox events if required.
Anggie
Sep 10, 2019Copper Contributor
The code you sent me runs smoothly. Now I want to know which element in my combo box has the focus. And how can I change that selection or move that focus to another element.
- AC22JJul 11, 2022Copper ContributorSubodh_Tiwari_sktneer
Excel gives "Compile error: Invalid use of Me keyword" on this code:
Private Sub ComboBox1_Change()
Me.ComboBox1.DropDown
End Sub - Subodh_Tiwari_sktneerSep 10, 2019Silver Contributor
Now place this code...
Private Sub ComboBox1_Change() Me.ComboBox1.DropDown End Sub
And use UP and Down arrow keys to scroll up and down and hit Enter to select an item.