View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Can I use a text input to define another file to reference?

Mike,

Anyway to do it without writing script for a custom formula? The only
reason is that I want to be able to share this with other users.

bob

"Mike H" wrote:

Bob,

Maybe this

myfile = Range("A1").Value & ".xls"
mypath = "C:\Documents and Settings\Desktop\"
Workbooks.Open Filename:=mypath & myfile

With your filename in A1

Mike

"bob" wrote:

This is a pretty complex problem I think.

I would like to be able to link to cells in separate files, and have that
file path determined by a text input.

Example.

I am working in a file called "Test". I want to reference cell A1 in a file
called "Inputs" saved on my desktop. Is there a way to look at a text input
in my "Test" file that would find A1 in "Inputs" if the text reads
"C:\Documents and Settings\Desktop\Inputs.xls"