Rowsource Invalid property value

F

FClifton

I am trying to set a Combobox Rowsource property. I want to include the name
of a worksheet $$TEMP$$. When I use the code:

ComboboxForms.RowSource = "$$TEMP$$!L1:M7"

I get the error: Could not set the RowSource property. Invalid property value.

How can I do this properly?
 
T

Tom Ogilvy

Private Sub UserForm_Initialize()
ComboBoxForms.ColumnCount = 2
ComboBoxForms.RowSource = "'$$TEMP$$'!L1:M7"
End Sub

worked for me. (added single quotes to contain the sheet name)
 
V

Vergel Adriano

You'll need to do it this way:

ComboboxForms.RowSource = "'$$TEMP$$'!L1:M7"

Notice the sheet name is enclosed in single quotes..
 
D

Dave Peterson

One more:

ComboboxForms.RowSource _
= worksheets("$$TEMP$$").range("L1:M7").address(external:=true)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RowSource 4
Combobox Rowsource 2
ListBox RowSource Property 2
userform combobox rowsource from database 5
RowSource property in cbox 3
row source 1
ComboBox match issue 4
Public Const & RowSource 4

Top