+ Reply to Thread
Results 1 to 5 of 5

UserForms - Many ComboBoxes One List

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    Guernsey
    MS-Off Ver
    excel 2010
    Posts
    15

    UserForms - Many ComboBoxes One List

    Hi Guys

    Does anyone know how to link comboxboxes in userforms to a list in MS Word?

    I have userforms with multiple comboboxes relating to Country Lists. I can link using VBA through [Me.ComboBox*.List = Split("ALBANIA ANGOLA BERMUDA")] but currently have to write the same code for each combobox.

    I have 10 Comboboxes with 120 Countries (same list).

    Any help appreciated.

    Thanks

    Orlando

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: UserForms - Many ComboBoxes One List

    Is there a reason you can't just have the one list stored is a variable??? For example:
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    07-08-2013
    Location
    Guernsey
    MS-Off Ver
    excel 2010
    Posts
    15

    Re: UserForms - Many ComboBoxes One List

    Thanks Paul.....

    Solution works.

    Orlando

  4. #4
    Registered User
    Join Date
    07-08-2013
    Location
    Guernsey
    MS-Off Ver
    excel 2010
    Posts
    15

    Re: UserForms - Many ComboBoxes One List

    Hi Paul

    If this breaks forum rules, please advise and ill post to new thread.

    However, Quick Question: Have responded to confirm solution works... do you know how i can add spaces to the String for countrys with more than 1 word (i.e. Great Britain).

    Can get the following to work:

    [Const ListItems As String = "Great" & "_" & "Britain America Ireland"] result for GB is Great_Britain, when i move the underscore e.g. [Great & "_" "Britain] the string adds britain to another line.

    Any help greatly appreciated.

    Cheers

    Orlando

  5. #5
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: UserForms - Many ComboBoxes One List

    You could use:
    Please Login or Register  to view this content.
    Last edited by macropod; 10-31-2016 at 07:55 PM.

+ 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: 3
    Last Post: 02-18-2015, 02:02 PM
  2. [SOLVED] Send Email button with data from Userforms textbox, and comboboxes
    By JQ113 in forum Outlook Programming / VBA / Macros
    Replies: 7
    Last Post: 03-25-2014, 09:20 PM
  3. VBA programming help with userforms and comboboxes
    By brykarc22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2011, 12:53 PM
  4. AppCrash resulting fomr variables to do with comboboxes in userforms
    By atlas_85 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-28-2010, 02:41 AM
  5. UserForms & dependent ComboBoxes?
    By hit_king51 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-11-2010, 09:30 PM
  6. [SOLVED] Comboboxes on userforms
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2006, 02:55 PM
  7. comboboxes, userforms and class modules
    By natanz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2005, 11:10 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