Rowsource Invalid property value

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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)
 
You'll need to do it this way:

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

Notice the sheet name is enclosed in single quotes..
 
One more:

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