View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Murphy[_16_] Simon Murphy[_16_] is offline
external usenet poster
 
Posts: 1
Default Replacing references from one file to another


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