Combobox rowsource

  • Thread starter Marinos Andreou
  • Start date
M

Marinos Andreou

The following line:
CboCase.RowSource = "'[Computer Price calculator.xls]Case'!$A$2:$B$4"
gives an error message: "runtime error 380.Could not set the Rowsource
property. Invalid property value"

The problem does not appear if I remove the spaces from the file name and
the single quotes but it appears if I remove the spaces and leave the single
quotes in place. Does anyone know how to make it work without having to
remove the spaces from the filename?

Thanks in advance
 
B

Bob Phillips

Marinos,

There is absolutely no problem with spaces in the name, so it is not that.
Most likely, you think there is one space and there is actually 2 or more.
Double check the name and the number of spaces.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
M

Marinos Andreou

Thank you for your answer. I was setting a cell with the range reference and
then setting the rowsource property with the value stored in the cell but
the cell was eating up the first quote. Adding another quote infront of the
range string before storing in the cell did it.

Regards

Marinos Andreou

Bob Phillips said:
Marinos,

There is absolutely no problem with spaces in the name, so it is not that.
Most likely, you think there is one space and there is actually 2 or more.
Double check the name and the number of spaces.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

Marinos Andreou said:
The following line:
CboCase.RowSource = "'[Computer Price calculator.xls]Case'!$A$2:$B$4"
gives an error message: "runtime error 380.Could not set the Rowsource
property. Invalid property value"

The problem does not appear if I remove the spaces from the file name and
the single quotes but it appears if I remove the spaces and leave the single
quotes in place. Does anyone know how to make it work without having to
remove the spaces from the filename?

Thanks in advance
 

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

Top