basepointdesignz
Programmer
Hi,
I know that this is a simple one but i'm simple, so help me, lol..
I want to trap error for if nothing has been selected in a listbox (its set to multiselect btw, just in case that matters)..
I tried this:
...as a test but it didn't seem to work (saw that code somewhere online - not the msgbox bit)..
Posted same thread in VB6 forum just on case..
Cheers,
Paul
basepointdesignzltd..
XP Pro..
Pentium Core 2 Q6600 Quad Core
ASUS P5N-E SLI Motherboard
4GB DDR2 RAM
2 x SLI NVIDIA 8500GT SLi 1024MB DDR2 PCI-Express Graphics Cards
I know that this is a simple one but i'm simple, so help me, lol..
I want to trap error for if nothing has been selected in a listbox (its set to multiselect btw, just in case that matters)..
I tried this:
Code:
If LayoutLIST.ListIndex = -1 Then
MsgBox "No, its not selected"
Exit Sub
End If
...as a test but it didn't seem to work (saw that code somewhere online - not the msgbox bit)..
Posted same thread in VB6 forum just on case..
Cheers,
Paul
basepointdesignzltd..
XP Pro..
Pentium Core 2 Q6600 Quad Core
ASUS P5N-E SLI Motherboard
4GB DDR2 RAM
2 x SLI NVIDIA 8500GT SLi 1024MB DDR2 PCI-Express Graphics Cards