Question Listview Help!

Lusty

New member
Joined
Apr 18, 2008
Messages
3
Programming Experience
1-3
Ok,

I have looked and can't figure out how to get around this error.

Basically I have 2 listviews, when I click a button I want the selected item from the 1st listbox to copy to the 2nd box. It all works great unless nothing is selected! If nothing is selected it errors and crashes the program.

How do I get around this? It's been driving me bonkers. It keeps coming back with an error saying the index can't = 0.

I'm sure it's something simple but I am having a moment...:confused:
 
Before doing whatever it is that's causing the app to crash, check that the .SelectedIndicies.Count is greater than zero.
 
Yep works! I kept putting ..SelectedIndicies.item(0).count after and that's what kept screwing it up.

Thanks a ton!
 
Back
Top