“Excel VBA verhindern, Rettung” Code-Antworten

Excel VBA verhindern das Speichern der Arbeitsmappe

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Cancel = True                       ' Cancels in any case
    ' Or :
    If SaveAsUI Then Cancel = True      ' Cancels only if saving is asked by user, not via code
End Sub

' Prevents Excel from requesting a save before closing
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.ThisWorkbook.Saved = True
End Sub
VasteMonde

Excel VBA verhindern, Rettung

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Cancel = True 
    msgbox "Forbidden."
End Sub
VasteMonde

Ähnliche Antworten wie “Excel VBA verhindern, Rettung”

Fragen ähnlich wie “Excel VBA verhindern, Rettung”

Weitere verwandte Antworten zu “Excel VBA verhindern, Rettung” auf VBA

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen