ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combobox rowsource (https://www.excelbanter.com/excel-programming/355095-combobox-rowsource.html)

Marinos Andreou

Combobox rowsource
 
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
--
Marinos Andreou
B.Sc Computer Engineering
mobile: 99-533228



Bob Phillips[_6_]

Combobox rowsource
 
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" wrote in message
...
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
--
Marinos Andreou
B.Sc Computer Engineering
mobile: 99-533228





Marinos Andreou

Combobox rowsource
 
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" wrote in message
...
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" wrote in message
...
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
--
Marinos Andreou
B.Sc Computer Engineering
mobile: 99-533228








All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com