LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default ActiveWorkbook.ChangeLink

I have some code which updates the links for named files

Sub UpdateLink1()
ActiveWorkbook.ChangeLink _
"\Forecasting\FY2006\1106\OpsPlan\1106JudgementPap erLinksv003.xls", _
"\Forecasting\FY2007\0307\OpsPlan\0307JudgementPap erLinksv001.xls",
xlExcelLinks
End Sub

I want to make the macro dynamic so that it picks up these filenames from
named ranges TextForOldLink and TextForNewLink.

I tried the following substitution but it didn't work

Sub UpdateLink2()
ActiveWorkbook.ChangeLink _
Worksheet.Range("TextForOldLink").Value, _
Worksheet.Range("TextForNewLink").Value, xlExcelLinks
End Sub

Can anyone tell me please, how do I use the contents of Named Ranges in VBA
Code?

In this case the contents are lables.

Regards

 
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
ChangeLink error Keith[_7_] Excel Programming 0 April 30th 04 07:46 PM
ChangeLink Joe Bannister Excel Programming 2 April 19th 04 09:42 AM
ChangeLink Joe Bannister Excel Programming 0 January 26th 04 09:05 AM
ChangeLink Joe Bannister[_2_] Excel Programming 0 January 12th 04 03:29 PM
ChangeLink Joe Bannister Excel Programming 1 December 1st 03 02:55 PM


All times are GMT +1. The time now is 04:13 PM.

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"