mit folgendem Code (ist schon ca 15 Jahre alt ;) )
speicher ich im Hintergrund die aktuelle
Datei in einem separaten Verzeichnis.
Jetzt speichert er mir die Datei jedoch mit der Endung .xls
Was muss am Code geändert werden, dass die Datei
mit ihrer originalen Endung xlsx, xlsm, xlsb ... usw
gespeichert wird.
Danke für einen Tipp :)
Gruß
Werner
Sub KopieSpeichern()
Dim sPath As String, sFile As String, sName As String, Tagesdatum As String
sPath = "h:\private\backup"
user = Environ("username")
Tagesdatum = Application.Text(Now(), "yymmdd hhmm")
If Right(sPath, 1) "\" Then
sPath = sPath & "\"
End If
sName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4)
sFile = Tagesdatum & " " & user & " " & sName & ".XLS"
ActiveWorkbook.SaveCopyAs sPath & sFile
End Sub