Rowsource Invalid property value

G

Guest

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?
 
G

Guest

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)
 
G

Guest

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
row source 1
ListBox RowSource Property 2
userform combobox rowsource from database 5
Combobox Rowsource 2
Public Const & RowSource 4
RowSource property in cbox 3
Roesource problem 1

Top