Thread
:
Select range from unopened workbook
View Single Post
#
5
Posted to microsoft.public.excel.programming
FSt1
external usenet poster
Posts: 3,942
Select range from unopened workbook
hi
you are right. but nothing in his post made me think of that.
so i guess i got turned around.
regards
FSt1
"Don Guillett" wrote:
Unless
range("A12").formula="=[BILLRATE.xls].BILLRATE!A1"
-- =[20100201.xls]Sheet1!$E$13
Don Guillett
Microsoft MVP Excel
SalesAid Software
"FSt1" wrote in message
...
hi
the line of code you are using is for open workbooks. to get data from a
closed workbook, you will have to use ADO.
See this site.
http://www.rondebruin.nl/ado.htm
Regards
FSt1
"Andrew" wrote:
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
.
.
Reply With Quote
FSt1
View Public Profile
Find all posts by FSt1