|
-
Mar 6th, 2007, 04:19 AM
#1
Thread Starter
Addicted Member
[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
Abrium
Asking the beginners questions so you don't have to!
If by chance hell actually froze over and I some how helped you... Please rate.
-
Mar 6th, 2007, 11:57 AM
#2
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...
-
Mar 6th, 2007, 12:32 PM
#3
Thread Starter
Addicted Member
Re: [2005] Listbox Validation
How does that not go together, that is a validating sub to insure validation before focus shifts to another control.
Abrium
Asking the beginners questions so you don't have to!
If by chance hell actually froze over and I some how helped you... Please rate.
-
Mar 6th, 2007, 12:33 PM
#4
Thread Starter
Addicted Member
Re: [2005] Listbox Validation
The text in the message box is just test text to ensure that it works properly
Abrium
Asking the beginners questions so you don't have to!
If by chance hell actually froze over and I some how helped you... Please rate.
-
Mar 6th, 2007, 01:00 PM
#5
Re: [2005] Listbox Validation
so..... back to my question, can you post your code? It's simple, no code, no idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|