Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Location
    Sacramento
    Posts
    2

    Angry Unanswered: Excel Listbox Question

    I am having a problem with a listbox in a userform.

    In this userform there are listboxs 1-4. when I'm attempting to select something in listbox 1 it outlines the selection but does not highlight it, nor does it assign the selection to the value. All of the other listboxes work perfectly fine, and I've triple checked that no properties are different between the various listboxes.

    What am I missing?

  2. #2
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Re: Excel Listbox Question

    Is your list box being populated with data via the ".additem" method? It's hard to tell with seeing the userform and code.


    Originally posted by Biggdawg320
    I am having a problem with a listbox in a userform.

    In this userform there are listboxs 1-4. when I'm attempting to select something in listbox 1 it outlines the selection but does not highlight it, nor does it assign the selection to the value. All of the other listboxes work perfectly fine, and I've triple checked that no properties are different between the various listboxes.

    What am I missing?

  3. #3
    Join Date
    Nov 2003
    Location
    Sacramento
    Posts
    2

    Re: Excel Listbox Question

    Originally posted by RickKnight
    Is your list box being populated with data via the ".additem" method? It's hard to tell with seeing the userform and code.
    No actually, my listbox is being populated by the rowsource value.

  4. #4
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Re: Excel Listbox Question

    Next question. Is this occurring in a VBA 'userform' or are you using the sheet's form list box control? Sounds like, from your explaination, a forms control. The VBA list box control used in a VBA userform would not act in this fashion when it's running (compiled). Can you clarify?

    Originally posted by Biggdawg320
    No actually, my listbox is being populated by the rowsource value.

  5. #5
    Join Date
    Mar 2008
    Location
    East Anglia
    Posts
    7

    Try This - give each control a .setfocus in the initialse event of the form

    Hi, I had a similar problem last week for a selection form I created at work. I had filled numerous list boxes / combo boxes with data from a worksheet. Then for some reason or another a couple of them would only highlight with just an outline and not properly select when they were first clicked in. All the properties were the same and the different behaviours of them just didn't make sense.

    To solver it in the 'initialise' event of the form I made a .setfocus command on each of the listboxes in turn, ending on the one that I wished the form to give focus to the user first. This had the effect of curing the behaviour of those 'miss behaving' listboxes.

    A bit quirky but it fixed it! - might be worth a try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •