Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nul error 1

Status
Not open for further replies.

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
 
And what about this ?
MsgBox Nz(Me!lstSelectedApps.Column(1, varitem), "????")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top