+ Reply to Thread
Results 1 to 7 of 7

UserForm -> Combobox and it's RowSource property?

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    Ottawa, Ontario, Canada
    MS-Off Ver
    Excel 2002
    Posts
    13

    Question UserForm -> Combobox and it's RowSource property?

    Hi guys,

    Facts:
    I created a userform and in it, I have a combobox. In its properties, there's an item (RowSource) which allows you to let the user pick from a list (my list, in this case is a range called HR_Reps within the workbook). Basically, when clicking on the dropdown(combobox), you get a list of HR Representatives. The RowSource works fine while the Range is within the workbook.

    Challenge:
    I'm trying to put a range from a different file in RowSource...

    1 - Don't know the format
    2 - Is it even possible to do it?

    Let me know what you think...and thanks!

    Alex

  2. #2
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: UserForm -> Combobox and it's RowSource property?

    Alex, can you post an example of your workbook?

    There are a couple of ways to fill the combobox/listbox...post up your example so we can see which method may work best for you.
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  3. #3
    Registered User
    Join Date
    11-04-2010
    Location
    Ottawa, Ontario, Canada
    MS-Off Ver
    Excel 2002
    Posts
    13

    Talking Re: UserForm -> Combobox and it's RowSource property?

    Ah, I figured it out.

    In a nutshell, I had to do it in VBA because I couldn't do it from the property by changing RowSource. This would be a sample of what my code looks like.

    ---------------------------------------------------
    Private Sub UserForm_Activate()

    ' Updates ranges to reference file.

    With UserForm1
    .ComboBox1.RowSource = ("'L:\Folders\[Reference List.xls]Sheet1'!MyRange")
    End With

    End Sub

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: UserForm -> Combobox and it's RowSource property?

    hi, CEC, if another workbook is open it works fine. format:

    Please Login or Register  to view this content.
    Xl0000115.xls - file name of open workbook
    Data - sheet name

    If the workbook is closed a full path needed.

  5. #5
    Registered User
    Join Date
    11-04-2010
    Location
    Ottawa, Ontario, Canada
    MS-Off Ver
    Excel 2002
    Posts
    13

    Smile Re: UserForm -> Combobox and it's RowSource property?

    Quote Originally Posted by watersev View Post
    hi, CEC, if another workbook is open it works fine. format:

    Please Login or Register  to view this content.
    Xl0000115.xls - file name of open workbook
    Data - sheet name

    If the workbook is closed a full path needed.
    In my case, it wouldn't be practicle. The main file will be distributed to hundreds of users...it's why I needed a remote range so I can only update 1 file (and not all hundreds of them) every time a representative comes/goes. Opening the file would turn it Read Only and then other users wouldn't be able to use it for that brief moment.

    The VBA methods works pretty good for me. Thanks though.

  6. #6
    Registered User
    Join Date
    12-24-2012
    Location
    ghaziabad
    MS-Off Ver
    2010 excel
    Posts
    19

    Re: UserForm -> Combobox and it's RowSource property?

    Pls help me in linking my excel sheet named training to combobox1 in userform of QKB sheet. i want when userform is load in QKB, it display data of training sheet in combobox1.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: UserForm -> Combobox and it's RowSource property?

    ankur,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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