Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
using a loop, something like: Dim OldLink, NewLink As String Dim wsInput As Worksheet Dim i as long Set wsInput = ThisWorkbook.Worksheets("Input") for i =11 to 47 OldLinks = wsInput.Range("E" & i).Value NewLink = wsInput.Range("C" & i).Value ThisWorkbook.ChangeLink Name:=OldLink, NewName:=NewLink, Type:=xlExcelLinks Next i -- Regards, Sébastien <http://www.ondemandanalysis.com "shorticake" wrote: Each month I have to change the links in my workbook. I've listed the paths of the current links in cells E11:E47, and what I want the paths of the new links to be in cells C11:C47. How can I change the code below so that it will change all the links in the correct order for example, E11 to C11, E12 to C12, and so on? Thanks in advance! Sub ChangeLink() Dim OldLink, NewLink As String Dim wsInput As Worksheet Set wsInput = ThisWorkbook.Worksheets("Input") OldLinks = wsInput.Range("E15").Value NewLink = wsInput.Range("C15").Value ThisWorkbook.ChangeLink Name:=OldLink, NewName:=NewLink, Type:=xlExcelLinks End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change multiple links at once | Excel Worksheet Functions | |||
Change links between 2 spreadsheets | Excel Discussion (Misc queries) | |||
change links | Excel Programming | |||
change links by a macro | Excel Programming | |||
Worksheet Change event and Links? | Excel Programming |