+ Reply to Thread
Results 1 to 4 of 4

Multiple UserForms: ComboBox "Remembers" Previously Selected ListIndex Value

  1. #1
    Registered User
    Join Date
    11-25-2018
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    7

    Multiple UserForms: ComboBox "Remembers" Previously Selected ListIndex Value

    My problem arises when I am calling a series of user forms one after the other.
    Each form has a combo box. (I have tried with ListBoxes and have the same issue)

    When the user makes a selection in a combo box, they are taken to a new form and a new combo box. There they can make further decisions and so on.

    There is no problem on the first pass through the user forms.

    However, when the user restarts from the first form and makes a selection, the combo on the second form has the previous pass's selection highlighted.
    It wouldn't be so bad, except that clicking on this highlighted item (if it happened to be the user's next wish) won't fire the action applicable to the selection event.

    To clear the selection, I have tried:
    Please Login or Register  to view this content.
    I have tried the above code in both the Activated and Initialized events of the forms and even added it to the Terminate event.
    But that pesky highlighting keeps coming up.

    Here is the code I'm using:

    Please Login or Register  to view this content.
    If someone can put me straight, I'd be very grateful and won't feel so much that the whole day has been wasted!

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Multiple UserForms: ComboBox "Remembers" Previously Selected ListIndex Value

    place an example of your file

  3. #3
    Registered User
    Join Date
    11-25-2018
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    7

    Re: Multiple UserForms: ComboBox "Remembers" Previously Selected ListIndex Value (SOLVED)

    Bizarrely, while tidying up the file ready to upload it, I found when I ran it again that I have somehow fixed the issue.
    Sadly I don't know what I did exactly that removed the problem, so can't post an answer for anyone who later has the same one.

    FWIW I will upload a version of the file though.
    But, just to confirm, I now don't need an answer.
    Attached Files Attached Files
    Last edited by Xtab; 11-25-2018 at 02:29 PM. Reason: Found the "Solved" option for Thread Header

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Multiple UserForms: ComboBox "Remembers" Previously Selected ListIndex Value

    Don't use additem

    This is enough for the StartMenu form

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel "remembers" wrong location for add-in
    By MrShorty in forum Excel General
    Replies: 4
    Last Post: 04-27-2018, 11:33 AM
  2. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  3. ActiveX Combobox with multiple columns and "linking" a cell
    By Jelmer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-30-2016, 02:00 PM
  4. [SOLVED] Combobox - jump to sheet based on selected listindex
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2015, 03:05 AM
  5. = EMBED("Forms.ComboBox.1","") error "Reference not valid."
    By CatharinaCatharina in forum Excel General
    Replies: 2
    Last Post: 12-11-2014, 09:58 AM
  6. Replies: 0
    Last Post: 03-21-2014, 09:58 AM
  7. Replies: 2
    Last Post: 06-06-2013, 12:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1