VeryForgetful
Board Regular
- Joined
- Mar 1, 2015
- Messages
- 242
I'm using the following code to list all linked workbook file paths to a worksheet within my file.
I'm looking for a way to go through each cell sequenially to close each of these workbooks without a save changes prompt. Can anyone suggest a loop with goes through each cell in column A to close each workbook please?
Thanks
I'm looking for a way to go through each cell sequenially to close each of these workbooks without a save changes prompt. Can anyone suggest a loop with goes through each cell in column A to close each workbook please?
Code:
Sub ListLinks()
Dim aLinks As Variant
aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(aLinks) Then
Sheets("File Paths").Select
For i = 1 To UBound(aLinks)
Cells(i, 1).Value = aLinks(i)
Next i
End If
End Sub
Thanks