|
-
May 22nd, 2006, 11:30 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Listbox problem
Ok, my code starts with this:
VB Code:
If shops.ListIndex = "shop 1 - small" Then
and then carries on. shops is the name of my listbox and this code goes on a button. But then every time i try and work it it comes up with a runtime error saying "type mismatch". i also tried this with it being shops.selected instead but that didn't work either.
All help would be appreciated. Thanks.
Last edited by Hack; May 22nd, 2006 at 12:19 PM.
Reason: Added [RESOLVED] to thread title
-
May 22nd, 2006, 11:44 AM
#2
Re: Listbox problem
 Originally Posted by ahpro
Ok, my code starts with this:
VB Code:
If shops.ListIndex = "shop 1 - small" Then
and then carries on. shops is the name of my listbox and this code goes on a button. But then every time i try and work it it comes up with a runtime error saying "type mismatch". i also tried this with it being shops.selected instead but that didn't work either.
All help would be appreciated. Thanks.
VB Code:
If shops.List(shops.ListIndex) = 'blah blah'
-
May 22nd, 2006, 12:01 PM
#3
Thread Starter
Addicted Member
Re: Listbox problem
ok thanks.
-
May 22nd, 2006, 12:06 PM
#4
Re: Listbox problem
No problem.
And, lstShops would be more in keeping with control naming conventions.
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
|