Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy range managing external links

Status
Not open for further replies.

HorseGoose

Programmer
Apr 24, 2003
40
GB
How to re-link formulas from workbooks which have been renamed and contain broken links to the current or a new workbook, assuming it is just the link which is broken but the reference sheets still exist in the workbook. Clearly this can be done using the menus but if you dont want to user to have any access to the menus you could do it like this.

Dim varlinks as varient
Dim loops as integer
varlinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(varlinks) Then
For loops = 1 To UBound(vargeneral)
ActiveWorkbook.ChangeLink Name:=vargeneral(loops), NewName:=ActiveWorkbook.Name, Type:=xlExcelLinks
Next loops
End If

This solved a problem I have been having with saving data between workbooks, maybe someone else will find it useful.





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top