underpressure
Board Regular
- Joined
- Nov 24, 2012
- Messages
- 141
When debugging, UserForm ComboBox1 and 2 will “auto select” the names in the ranges.
I can enter the first letter in the ComboBox and the item is displayed, in this case, Range R is a list of cities, Range S is a list of States.
When the UserForm is run LIVE, I must enter the entire city or state name even though the ComboBoxes display the lists.
What can I do to resolve this issue?
I can enter the first letter in the ComboBox and the item is displayed, in this case, Range R is a list of cities, Range S is a list of States.
When the UserForm is run LIVE, I must enter the entire city or state name even though the ComboBoxes display the lists.
What can I do to resolve this issue?
Code:
Private Sub UserForm_Initialize()
Dim x
Dim y
With Sheets("Settings")
For x = 1 To .Cells(Rows.Count, "R").End(xlUp).Row
ComboBox1.AddItem (.Range("R" & x).Value)
Next x
For y = 1 To .Cells(Rows.Count, "S").End(xlUp).Row
ComboBox2.AddItem (.Range("S" & y).Value)
Next y
End With
End Sub