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
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
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
hi, CEC, if another workbook is open it works fine. format:
Xl0000115.xls - file name of open workbook[Xl0000115.xls]Data!$B$25:$B$30
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks