HorseGoose
Programmer
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.
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.