Danke Euch, ich habs nun so gelöst:
01.09.2009 15:39:27
SteffenS
Sub conv_all_files_open()
Dim pathadmin As String, apath As String
pathadmin = ThisWorkbook.Path & "\"
'speichern
Dim wkb As Workbook
Dim awkb As String
'Dateien konvertieren
Application.DisplayAlerts = False
For Each wkb In Workbooks
If wkb.FullName ThisWorkbook.FullName Then
apath = wkb.Path & "\"
awkb = Left(wkb.Name, Len(wkb.Name) - 4) & xlf07
wkb.SaveAs Filename:=apath & awkb, FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
CreateBackup:=False
End If
Next wkb
Application.DisplayAlerts = True
'Dateien nochmal speichern
For Each wkb In Workbooks
If wkb.FullName ThisWorkbook.FullName Then
wkb.Save
End If
Next wkb
'Dateien schliessen & alte Datei löschen
For Each wkb In Workbooks
If wkb.FullName ThisWorkbook.FullName Then
apath = wkb.Path & "\"
awkb = Left(wkb.Name, Len(wkb.Name) - 5) & xlf
wkb.Close savechanges:=False
Kill apath & awkb
End If
Next wkb
End Sub
VG
Steffen