external reference

  • Thread starter Thread starter Paul Levy
  • Start date Start date
P

Paul Levy

I am using Excel 5. (Don't laugh). I am trying to set a variable in a module
in one workbook by referencing a cell in another workbook (that contains
some data). How can I do this? I tried the following and it failed.

Sub test()
Dim j As Variant

j = Evaluate("[temp.xls]sheet1!R23C4")
End Sub

this gives me an error 2015
Any help is appreciated.
Thanks,
Paul
 
how about just retrieving that value directly:

dim j as variant
j = workbooks("temp.xls").worksheets("sheet1").range("D23").value





Paul said:
I am using Excel 5. (Don't laugh). I am trying to set a variable in a module
in one workbook by referencing a cell in another workbook (that contains
some data). How can I do this? I tried the following and it failed.

Sub test()
Dim j As Variant

j = Evaluate("[temp.xls]sheet1!R23C4")
End Sub

this gives me an error 2015
Any help is appreciated.
Thanks,
Paul
 

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

Back
Top