+ Reply to Thread
Results 1 to 7 of 7

I need help with multiple combo boxes in the same sheet

  1. #1
    Registered User
    Join Date
    09-04-2015
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2013
    Posts
    4

    I need help with multiple combo boxes in the same sheet

    Hello all,

    I am trying to use some ActiveX combo boxes in order to navigate between sheets and got stuck when added multiple combo boxes in the same sheet.

    Initially, all went well until I added more than one combo boxes to the sheet.

    Can anyone help me fix this code?

    macro template with lists.xlsm

    Thank you in advance,

    Radu Stan

    ~POWER EDITED: Reattached the correct document!~
    Last edited by RahdooSrM; 09-04-2015 at 06:30 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,531

    Re: I need help with multiple combo boxes in the same sheet

    I will try to send you in the right direction because I don't have time to actually fix all the code. But here is your problem.

    Your sheet with the comboboxes has a series of Subs that handle changes in each of the comboboxes, like this
    Please Login or Register  to view this content.
    The whole concept of using a single FollowLink sub to manage everything doesn't work in this case (there are cases where it can work but this requires a little more complexity in the code). FollowLink gets the index from whatever combobox changed, but nothing in FollowLink knows which combobox changed. The actions you take are very specific to which combobox changes, so there is absolutely no advantage to lumping all of these actions together into a single Sub.

    I would eliminate FollowLink and simply put the appropriate code into each ComboBoxx_Change Sub. Like this. Then you no longer have to determine which sheet is active, etc.

    Your EnableEvents call doesn't affect combobox events, only worksheet events. I've shown a change to cover that.
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-04-2015
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2013
    Posts
    4

    Re: I need help with multiple combo boxes in the same sheet

    Thanks a lot for your help, I do not have a lot of experience with combo boxes. Using your suggestion I`ve managed to make the comboboxes to follow the link to another sheet, but unfortunately they all link to the same sheet. I`m still working on it and keep you updated with what I find.

    Again, thanks a lot for your time and help.

    Radu Stan

  4. #4
    Registered User
    Join Date
    09-04-2015
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2013
    Posts
    4

    Re: I need help with multiple combo boxes in the same sheet

    Hello again guys,

    I did not managed to fix the code attached you can see the stage I am at this moment. If you have time, can you take a look and give me some tips?

    copy of macro template with lists.xlsm

    Thanks in advance,

    Radu Stan

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,531

    Re: I need help with multiple combo boxes in the same sheet

    This version takes advantage of the fact that your combobox items are exactly the same as the sheet names. You don't need a Case Select, you can just refer directly to the combobox item. I think you'll find this is much simpler than your original code.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-04-2015
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2013
    Posts
    4

    Re: I need help with multiple combo boxes in the same sheet

    This is awesome, thanks a lot for your time and help! This is indeed much simpler.

    Thanks again and I wish you a great week!

    Radu Stan

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,531

    Re: I need help with multiple combo boxes in the same sheet

    Glad to help.

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

+ 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] Cascade Multiple Combo Boxes
    By NamiSama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2014, 02:13 PM
  2. I need a code for presence check to check multiple text boxes and combo boxes
    By Lee_wwfc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2013, 01:53 PM
  3. How Can I Select Multiple Combo Boxes
    By PPD in forum Excel General
    Replies: 4
    Last Post: 09-28-2012, 03:33 PM
  4. Multiple Combo Boxes
    By whatsmyname in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-25-2009, 04:05 PM
  5. Multiple Combo Boxes
    By OldSoldier in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-20-2009, 05:10 AM
  6. Fill Combo boxes on each sheet
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2009, 05:31 PM
  7. multiple combo boxes
    By LilyDog7 in forum Excel General
    Replies: 4
    Last Post: 10-17-2005, 05:22 PM

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