Gruppe
Datei
Problem
Die in Spalte A genannten Dateien sollen geöffnet, die Verknüpfungen aktualisiert gespeichert und wieder geschlossen werden.
StandardModule: Modul1
Sub OeffnenSchliessen()
Dim iRow As Integer
Dim sFile As String
On Error GoTo ERRORHANDLER
Application.ScreenUpdating = False
Application.EnableEvents = False
iRow = 1
Do Until IsEmpty(Cells(iRow, 1))
sFile = Cells(iRow, 1).Value
If Dir(sFile) <> "" Then
Workbooks.Open _
Filename:=sFile, _
updatelinks:=True
ActiveWorkbook.Close savechanges:=True
End If
iRow = iRow + 1
Loop
ERRORHANDLER:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub