Article ID: 141282
Article Last Modified on 10/11/2006
Sub OpenLinkedWorkbooks()
Dim Links As Variant
' Obtain an array for the links to Excel workbooks
' in the active workbook.
Links = ActiveWorkbook.LinkSources(xlExcelLinks)
' If the Links array is not empty then open each
' linked workbook. If the array is empty, then
' display an error message.
If Not IsEmpty(Links) Then
For i = 1 To UBound(Links)
Workbooks.Open Links(i)
Next i
Else
MsgBox "This workbook does not contain any links " & _
"to other workbooks"
End If
End Sub
163435 VBA: Programming Resources for Visual Basic for Applications
226118 OFF2000: Programming Resources for Visual Basic for Applications
Additional query words: 5.00a 5.00c XL97 XL
Keywords: kbdtacode kbhowto kbprogramming KB141282