+ Reply to Thread
Results 1 to 7 of 7

Vba to clear and then populate activex comboboxes

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

    Vba to clear and then populate activex comboboxes

    Hi all,
    After gathering up as much information about activeX comboboxes from the net as icould find i've pieced together the below code which makes sense to me but doesn't work.
    I want the code to loop through ComboBoxes 3 thru 10 (the others to leave alone) and clear each combobox and then populate them with data from a different sheet. the data could have empty cells along the way so i've included in the code to skip over blanks.
    Please Login or Register  to view this content.

  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: Vba to clear and then populate activex comboboxes

    Hello kosherboy,

    Try this version of your macro. It should work if your comboBoxes are named "ComboBox1", "ComboBox2", etc.

    If you changed the names then the macro will need some changes.

    Please Login or Register  to view this content.
    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
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Vba to clear and then populate activex comboboxes

    Wow Wow Wow, you really could code!!
    Thank you so much

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

    Re: Vba to clear and then populate activex comboboxes

    Just noticed this issue:
    The first combobox lists the proper info but the second lists it twice and the 3rd one lists it 3 times and so on and so forth.
    Any way around this?

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

    Re: Vba to clear and then populate activex comboboxes

    I changed some parts of your code and now it works
    Please Login or Register  to view this content.

  6. #6
    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: Vba to clear and then populate activex comboboxes

    Hello kosherboy,

    Great job on fixing the problem!
    Sorry about that. I have been interrupted by phone calls all morning. While my code is a little more involved, it is faster because it assigns an array of all values to the ComboBox list.

    Here is the corrected code.
    Please Login or Register  to view this content.

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

    Re: Vba to clear and then populate activex comboboxes

    Thanks
    B regards.

+ 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. Add new row to table on {Tab} and pull frmatting and add ActiveX comboBoxes
    By cvelle89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2015, 10:11 AM
  2. [SOLVED] VBA help need for linking three ActiveX Control ComboBoxes
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 10:22 PM
  3. How to set up multiple Activex comboboxes using the same code (dashboard)
    By jane serky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-05-2013, 10:17 AM
  4. [SOLVED] need to loop through multiple activex comboboxes and modify properties
    By Bugsgas1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2012, 10:06 PM
  5. Indexing Through ACTIVEX Comboboxes
    By Hemimud in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-13-2012, 11:27 AM
  6. Linking two ActiveX comboboxes across different tabs
    By sgillette01 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-08-2011, 10:08 AM
  7. Linking two ActiveX Drop-Down ComboBoxes
    By Madic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2011, 02:42 AM

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