Sharid
Well-known Member
- Joined
- Apr 22, 2007
- Messages
- 1,064
- Office Version
- 2016
- Platform
- Windows
I have a userform , with multi page on it, on some of the pages I have combo boxes. I used the following bit of the code to add items to the combo-boxes. I used the same code for each of combo-boxes. I just changed the NAME so it referred to the correct combo-box
The Problem
The problem I am having is that each time I select an item, it reshows it in the dropdown of the combo-box, hence the list of dropdown grows.
In the attached example, select a option from the combo box and then click into the textbox, then open combo-box again and the list should have grown.
Download File
VBA Code:
Private Sub ComboBox1_Enter()
ComboBox1.AddItem ("Car")
ComboBox1.AddItem ("Bus")
ComboBox1.AddItem ("Bike")
ComboBox1.AddItem ("Train")
ComboBox1.AddItem ("Walking")
End Sub
The Problem
The problem I am having is that each time I select an item, it reshows it in the dropdown of the combo-box, hence the list of dropdown grows.
In the attached example, select a option from the combo box and then click into the textbox, then open combo-box again and the list should have grown.
Download File