After alot of trial and error I'm using the code below to change the links in my spreadsheet. The only problem is if when the dialogue box turns up and I press cancel, it still updates.
Is there away so that if I press cancel no changes are made?
Set ws = ThisWorkbook.Worksheets("Calcs")
OldLink = ws.Range("B4").Value
NewLink = ws.Range("B3").Value
ThisWorkbook.ChangeLink Name:=OldLink, NewName:=NewLink, Type:=xlExcelLinks
Is there away so that if I press cancel no changes are made?
Set ws = ThisWorkbook.Worksheets("Calcs")
OldLink = ws.Range("B4").Value
NewLink = ws.Range("B3").Value
ThisWorkbook.ChangeLink Name:=OldLink, NewName:=NewLink, Type:=xlExcelLinks