george hart
Board Regular
- Joined
- Dec 4, 2008
- Messages
- 241
Hi can anyone advise why this works ok using a listBox but falls over when I change to a ComboBox?
It falls over here "If ComboBox1.Selected(i) Then"
Private Sub OKButton_Click()
Dim Msg As String
Dim i As Integer
For i = 0 To ComboBox1.ListCount - 1
If ComboBox1.Selected(i) Then
Range("A1").Value = ComboBox1.List(i)
End If
Next i
Unload UserForm1
End Sub
It falls over here "If ComboBox1.Selected(i) Then"
Private Sub OKButton_Click()
Dim Msg As String
Dim i As Integer
For i = 0 To ComboBox1.ListCount - 1
If ComboBox1.Selected(i) Then
Range("A1").Value = ComboBox1.List(i)
End If
Next i
Unload UserForm1
End Sub