S
shorticake
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
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