G
Guest
I am trying to use a UserForm for the first time and I am having a few
problems.
I have managed to create a ComboBox and populate it. I have managed to show
and unload the UserForm, but I just can't seem to get the data selected by
the combobox.
What have I done wrong?
Sub testuform()
Dim CBSel
WRContactList.Show
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Name = "ComboBox1" Then
CBSel = ctl.Text
End If
Next ctl
MsgBox CBSel
End Sub
problems.
I have managed to create a ComboBox and populate it. I have managed to show
and unload the UserForm, but I just can't seem to get the data selected by
the combobox.
What have I done wrong?
Sub testuform()
Dim CBSel
WRContactList.Show
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Name = "ComboBox1" Then
CBSel = ctl.Text
End If
Next ctl
MsgBox CBSel
End Sub