LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Replacing references from one file to another

Hi Simon,

Thanks for responding. The problem is, I do not always know what the name
of the workbook is going to be, because it has been designed for any user to
specify its cost centres etc.

The name of each cost centre sheet that is copied is contained within the
sheet itself. Could the method you propose be used in this way too? Where
in the code would it go/what code would be replaced?

Thanks,

Ewan.

"Simon Murphy" wrote:


try something like:

ActiveWorkbook.ChangeLink Name:= _
"C:\data\book1.xls", NewName:= _
"C:\Data\book2.xls", Type:=xlExcelLinks


this is the equivalent of editlinkschange source

the edit replace approach you are currently doing may well work - I
have found it better to replace '=' with 'xx' first to convert to text,
then put it back to a formula after.

I prefer the .changelink approach though - you will need the full path
(workbook.FullName)

cheers
Simon


--
Simon Murphy
------------------------------------------------------------------------
Simon Murphy's Profile: http://www.excelforum.com/member.php...o&userid=26538
View this thread: http://www.excelforum.com/showthread...hreadid=470200


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing a password protected file. JEV Excel Discussion (Misc queries) 1 March 26th 09 01:08 PM
Replacing all references to a file, with a new file name. Lots!! phil Excel Worksheet Functions 1 May 10th 07 04:33 PM
Hexadecimal File Replacing excel file E.Q. Excel Discussion (Misc queries) 1 February 24th 07 01:57 PM
Replacing Named Range Names By Cell References in Formulas KL[_6_] Excel Programming 2 December 13th 04 08:56 PM
Replacing XLS file rather than saving FuzzyDove Excel Programming 3 November 19th 04 08:55 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"