S
Stuart Holley
I am trying to place all selected items from a multiselect listbox in
to a text box but keep getting the following error when reaching the
end of the list.
Run time error '-2147024809 (80070057)
could not get selected property. invalid argument
my code is as follows
Private Sub CommandButton13_Click()
'Dim noinlistbox1 As Long
Dim i As Long
TextBox11.Value = ""
For i = 0 To ListBox1.ListCount
If ListBox1.Selected(i) = True Then
TextBox11.Text = TextBox11.Text + Chr$(13) +
ListBox1.List(i)
End If
Next i
End Sub
help would be most appreciated
Stuart
to a text box but keep getting the following error when reaching the
end of the list.
Run time error '-2147024809 (80070057)
could not get selected property. invalid argument
my code is as follows
Private Sub CommandButton13_Click()
'Dim noinlistbox1 As Long
Dim i As Long
TextBox11.Value = ""
For i = 0 To ListBox1.ListCount
If ListBox1.Selected(i) = True Then
TextBox11.Text = TextBox11.Text + Chr$(13) +
ListBox1.List(i)
End If
Next i
End Sub
help would be most appreciated
Stuart