View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default how to keep formula un-changed when I chage to file folder?

close file2.xls (with file.xls still open) then close and move file1.xls or
do a file saveas.

--
Regards,
Tom Ogilvy

"miao jie" wrote in message
...
Hi, now I'm meet a problem as follow on Excel 2000 and 2003
I have define one function in one Excel file named "file1.xls"
in another excel file(file2.xls) I wanna use the function defined in
file1.xls, so I write the formula as following,
=file1.xls!function1(A1,A2)

in my VBA code, I can sure file2.xls always work with file1.xls together (
that's means when file2.xls reflash, file1.xls always be opened)

my problem is: when I copy the file2.xls to another folder and file1.xls
still in current folder(for example: D:\test\test1\file1.xls, and

file2.xls
move to C:\test1\file2.xls).

when I reopen file2.xls, the formula will changed to:
='D:\test\test1\file1.xls'!function1(A1,A2).

how I can keep the formula don't change when I copy & move file2.xls,

anyone
can help me, thanks in advance !