[2005] Listbox Validation
Hey all,
What is the best method for listbox validation? I have three list boxes and I'm trying to use the sub listbox with declaration validating. I have this code written but its not quite functioning like it would with a text box. I need a way to clean my code up because I have a ton of if...then statements trying to validate that an index has been selected or there is a value in a listbox.
"If LisWorkShop.SelectedIndex = -1 Then
MessageBox.Show("Workshop")
e.Cancel = True
Else
e.Cancel = False End If"
I'm just looking for a beginners way to streamline listbox validation
Thanks
Re: [2005] Listbox Validation
Can you post all of your code? The code you gave above doesn't appear to go together..... at least I hope you don't have it all together...
Re: [2005] Listbox Validation
How does that not go together, that is a validating sub to insure validation before focus shifts to another control.
Re: [2005] Listbox Validation
The text in the message box is just test text to ensure that it works properly
Re: [2005] Listbox Validation
so..... back to my question, can you post your code? It's simple, no code, no idea.