habe folgenden Code in meiner Datei:
Private Sub Workbook_Open()
If MsgBox("Dokument bearbeiten?", vbYesNo + vbDefaultButton1) = vbYes Then
ThisWorkbook.SaveAs "U:\USER\Automotive\Abrufe\Automobilaufstellung " & Format$(Date, " _
yyyy.mm.dd") & ".xls"
End If
End Sub
Private Sub Workbook_BeforeClose(cancel As Boolean)
If MsgBox("?nderungen in Original speichern?", vbYesNo + vbDefaultButton1) = vbYes Then
Application.DisplayAlerts = False
ThisWorkbook.Save
ThisWorkbook.SaveAs "U:\USER\Automotive\Abrufe\Automobilaufstellung" & ".xlsm"
Application.DisplayAlerts = True
Else
Application.Quit
End If
End Sub
Nun passiert es manchmal (komischerweise nicht immer) das er mich beim Schließen trotzdem fragt ob gespeichert werden soll. Wie kann ich das Vermeiden?Danke schonmal für die Hilfe
Gruß Hans