austin350s10
Active Member
- Joined
- Jul 30, 2010
- Messages
- 321
I'm working on a userform with a combobox styled as a drop down combo. I am filling this combobox with values upon UserForm_Initialize. I want the user to be able to make a selection from the dropdown or enter their own value. The problem I am having is when a user enters their own value I am unable to assign it to a variable. Does anyone know a workaround for this? retrieving
BoundColumn = 1 ColumnCount = 2
BoundColumn = 1 ColumnCount = 2
Code:
Dim myDiagName As String
Dim myDiagID As Integer
With Me.diagList
If .ListIndex < 0 Then
myDiagName = .List(-1, 1)
Else
myDiagID = .List(.ListIndex, 0)
myDiagName = .List(.ListIndex, 1)
End If
End With