Select range from unopened workbook
Make sure your spelling of the names is accurate. Make sure you actually
have a sheet named BILLRATE in the workbook. As a side note, why not just
use Range("A1") for your cell reference rather than the duplicative Cells(1,
1).Range("A1")? It does the same thing and saves space.
"Andrew" wrote in message
...
I'm trying to take data from an unopened workbook. I copied the
following code directly from my "Excel 2003 VBA" book.
range("A12") =
Workbooks("BILLRATE.xls").Worksheets("BILLRATE").C ells(1,
1).range("A1")
I get a "subscript out of range error on this. The workbook
"BILLRATE" is in the working folder. And I can call it if I use
Workbooks("BILLRATE.xls").Open. But when I try to access the range, I
get the subscript out of range error.
Any ideas?
thanks
|