+ Reply to Thread
Results 1 to 6 of 6

rangename into combo (FillList)

  1. #1
    Registered User
    Join Date
    09-23-2007
    Posts
    29

    rangename into combo (FillList)

    Let say i have A2:A5=mylist, B2:B5=mylist1
    i have defined this names trough Insert/name/define
    now, how to put these names into combo -- in combo properties FillList
    or is there a better way?
    thx

  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
    Hello Pinstipe,

    Are you wanting to include the names of the ranges in the drop down list, or use a named range in the ListFillRange property of the combo box?

    Thanks,
    Leith Ross

  3. #3
    Registered User
    Join Date
    09-23-2007
    Posts
    29
    Are you wanting to include the names of the ranges in the drop down list?
    yes this is what i am trying to do.
    Is it possible?

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

    Ok, here is the macro. I have included code for both types of combo boxes: Forms Toolbar, and Control Toolbox. Uncomment the code according to which one you have (the green code). If you aren't sure then try them one at a time. The combo box is referenced by object index number. You can use the name, just be sure to enclose it quotes. The Worksheet is set to Sheet1, and Ranges are set to "A2:A5, and "B2:B5". You can change these if you like. They are in blue. The macro assumes the combo boxes are on the same worksheet as the ranges,. If they aren't let me know so I revise the code.

    Example
    Please Login or Register  to view this content.
    Macro Code
    Please Login or Register  to view this content.
    Adding the Macro
    1. Copy the macro above pressing the keys CTRL+C
    2. Open your workbook
    3. Right Click on any Sheet's tab
    4. Left Click on View Code in the pop up menu
    5. Press the keys ALT+I to activate the Insert menu
    6. Press M to insert a Standard Module
    7. Paste the code by pressing the keys CTRL+V
    8. Make any custom changes you need to the macro
    9. Save the Macro by pressing the keys CTRL+S

    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    09-23-2007
    Posts
    29
    i will be off for next few days...so i will try this and i will get back to you after the vikend
    thak you so much for tyour effort ... hope it will do the trick

  6. #6
    Registered User
    Join Date
    09-23-2007
    Posts
    29
    @Leith Ross
    thanks for macro...it is working
    beautifull
    thx

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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