tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,834
- Office Version
- 365
- 2019
- Platform
- Windows
I have a combobox on my userform.
I want the code to trigger when I click on the dropdown arrow, so I used this:
but it seems after I have clicked on the dropdown and chosen a value, the combobox is empty.
Why is that?
I added:
because if I didn't, if I click on the dropdown n times, there will be n "Apples" and "Oranges", opposed to only having one of each.
Thanks
I want the code to trigger when I click on the dropdown arrow, so I used this:
Code:
Private Sub Fruit_DropButtonClick()
With Me.Fruit
.Clear
.AddItem "Apples"
.AddItem "Oranges"
End With
End Sub
but it seems after I have clicked on the dropdown and chosen a value, the combobox is empty.
Why is that?
I added:
Code:
.Clear
because if I didn't, if I click on the dropdown n times, there will be n "Apples" and "Oranges", opposed to only having one of each.
Thanks