Results 1 to 4 of 4

Thread: [RESOLVED] Listbox problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    221

    Resolved [RESOLVED] Listbox problem

    Ok, my code starts with this:

    VB Code:
    1. 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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Listbox problem

    Quote Originally Posted by ahpro
    Ok, my code starts with this:

    VB Code:
    1. 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:
    1. If shops.List(shops.ListIndex) = 'blah blah'

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    221

    Re: Listbox problem

    ok thanks.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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
  •  



Click Here to Expand Forum to Full Width