Ich möchte meine Tägliche Kassendaten speichern und zwar mit Kasse plus Datum (Kasse-06052008)
Geht dies nur per VBA ?
Kann mir jemand helfen ?
Vielen Dank
Gruß
Gerd Schanz
Sub TagesSicherung()
ActiveWorkbook.SaveCopyAs _
ActiveWorkbook.Path & "\Kasse-" & Format(Date, "yyyy-mm-dd") & ".xls"
End Sub
Das Makro kannst du in einem normalen Modul speichern und einer Schaltfläche
(aus der Symbolleiste "Formular") zuordnen.
Rückmeldung wäre nett! - Grüße von Erich aus Kamp-Lintfort
Option Explicit
Sub Tagessicherung()
Dim strName As String
strName = ActiveWorkbook.Path & "\Kasse-" & Format(Date, "yyyy-mm-dd") & ".xls"
If Dir(strName) > "" Then
If MsgBox(strName & vbLf & vbLf & "existiert bereits. Soll die Mappe " & _
"überschrieben werden?", vbQuestion + vbYesNo, "Tagessicherung") _
= vbNo Then Exit Sub
End If
ActiveWorkbook.SaveCopyAs strName
End Sub
Und hier eine Beispielmappe: https://www.herber.de/bbs/user/52210.xls
Rückmeldung wäre nett! - Grüße von Erich aus Kamp-Lintfort