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
|