GlenLynam
MIS
- Jul 26, 2002
- 121
This is probably something really simple but can anyone see why i keep getting invalid use of null errors in this code.
Private Sub cmdConcatenate_Click()
Dim varitem As Variant
Dim SelectAll As Long
For SelectAll = 0 To Me!lstSelectedApps.ListCount - 1
Me!lstSelectedApps.Selected(SelectAll) = True
Next SelectAll
For Each varitem In Me!lstSelectedApps.ItemsSelected
MsgBox Me!lstSelectedApps.Column(1)
Next varitem
End Sub
If you lose the first for next loop it works fine but i need this to select all the items in the listbox. Imgetting the error on the msgbox.
Thanks
Private Sub cmdConcatenate_Click()
Dim varitem As Variant
Dim SelectAll As Long
For SelectAll = 0 To Me!lstSelectedApps.ListCount - 1
Me!lstSelectedApps.Selected(SelectAll) = True
Next SelectAll
For Each varitem In Me!lstSelectedApps.ItemsSelected
MsgBox Me!lstSelectedApps.Column(1)
Next varitem
End Sub
If you lose the first for next loop it works fine but i need this to select all the items in the listbox. Imgetting the error on the msgbox.
Thanks