Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Dylan Bouchard   on Oct 14 In MS Office Category.

  
Question Answered By: Jawahir Burki   on Oct 14

I think we need to clarify some terminology here.
You say "link data". Do you mean you wish to ACCESS the data  in the shared
file,
or perhaps "copy" the data to your file?
Or are you trying to use lookup formulas, but cannot because the file  location
changes?

Then there's:
"I have a routing(??) to get the workbook  location"

Now, you DO realize that Excel expects the two workbooks to be OPEN, right?
Because if you're trying to "get the VB code  to go to the file location", it's
not going to
happen.
What you do is use whatever means you have at your disposal to locate the full
name
of the file with the data. Use Workbook.open FULLNAMEofFILE to get the file
open.
but the Workbooks() object uses just the filename.
so, you can use something like:
Workbooks.open filename:="C:\temp\BIGTIMEREPORT.xls"
then use
workbooks("LocalReport").worksheets("Sheet1").cells(1,1) =
workbooks.("BIGTIMEREPORT.xls").worksheets("Sheet1").cells(1,1)

Share: 

 
 
Didn't find what you were looking for? Find more on Linking data from one Workbook to another Or get search suggestion and latest updates.


Tagged: