+ Reply to Thread
Results 1 to 10 of 10

Enable next activex comboboxwhen current combobox is populated

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Enable next activex comboboxwhen current combobox is populated

    Hello,
    Not even sure where to start with this; i have 50 activex comboboxes (all named ComboBox1-50), all comboboxes are disabled except for the first one, i want that when the first combobox is populated from the drop down then the next combobox should get enabled, and when the 2nd combobox is populated the 3rd one should get enabled and so on and so forth.
    Here is what i started with but i'm at a loss as to how to further proceed:
    Please Login or Register  to view this content.
    Any help on this is much appreciated.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Enable next activex comboboxwhen current combobox is populated

    Hello kosherboy,

    Where is the information stored that the ComboBoxes will be loaded with?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Enable next activex comboboxwhen current combobox is populated

    Not sure about this, but something like
    Please Login or Register  to view this content.
    I sometimes think in simple terms so I might be way off base with this.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Enable next activex comboboxwhen current combobox is populated

    Quote Originally Posted by Leith Ross View Post
    Hello kosherboy,

    Where is the information stored that the ComboBoxes will be loaded with?
    I apologize if i wasn't clear in my original post, the comboboxes are already filled, i just want that when the user selects the first combobox and selects an item from the dropdown, as soon as the user clicks out of the combobox i want the combobox below to get enabled.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Enable next activex comboboxwhen current combobox is populated

    Hello kosherboy,

    Okay, the comb boxes have data. Starting in ComboBox1, after the user makes a selection then you want the focus to shift to ComboBox2, etc. Is that correct so far?

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Enable next activex comboboxwhen current combobox is populated

    Not so much the focus to be set but that the whole combobox (which is currently set to disabled) should be enabled.
    I will post example soon....

  7. #7
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Enable next activex comboboxwhen current combobox is populated

    Here is an example EnableComboBoxes.xlsx
    Please note that since i have about 100 comboboxes i would rather avoid placing a code into each combobox, i would rather the task be triggered through an event procedure, like selecting objects etc
    Thanks

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Enable next activex comboboxwhen current combobox is populated

    Hello kosherboy,

    Here you go. This uses a principle known as Sub-Classing. This allows objects that are already defined to be extended by adding new properties and events to an existing Class.

    When the workbook firsts opens, the ComboBoxes on Sheet1 are Sub-Classed. The Click event of the new Class, ComboEx, will enable the next ComboBox on the worksheet. When the last ComboBox is reached, the refernce is set back to the first ComboBox. If the ComboBoxes stop working, run the macro SubClassControls.

    Class Module - ComboBoxEx Code
    Please Login or Register  to view this content.
    Module1 Code
    Please Login or Register  to view this content.
    Workbook Open Event Code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Leith Ross; 01-06-2016 at 02:19 PM.

  9. #9
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Enable next activex comboboxwhen current combobox is populated

    Hi Leith Ross,
    It's responses such as yours that remind me of how much i don't know!
    I can't thank you enough!
    Best regards,
    Kosherboy

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Enable next activex comboboxwhen current combobox is populated

    Hello kosherboy,

    I don't know it all after all these years. Everyday I learn something new.

    Glad I could help. If you have any questions about how the code works, just ask.

+ 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. Replies: 0
    Last Post: 10-26-2015, 04:25 PM
  2. ActiveX combobox datalist dependant on previous combobox selections
    By Mrs Poodle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2014, 07:07 AM
  3. [SOLVED] fill listbox (ActiveX) based combobox (ActiveX)
    By elsg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-31-2014, 11:25 AM
  4. [SOLVED] ActiveX Enable Property macro
    By TimlmiT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2014, 03:26 PM
  5. [SOLVED] Excel ActiveX ListBox Does Not Enable
    By xlbee in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-27-2013, 06:20 PM
  6. Replies: 2
    Last Post: 12-07-2012, 02:10 AM
  7. Populate a activeX combobox from a selection of another combobox
    By ptramel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2009, 06:50 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