“Excel VBA Cegah Simpan” Kode Jawaban

Excel VBA Mencegah Simpan Buku Kerja

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 Cegah Simpan

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

Jawaban yang mirip dengan “Excel VBA Cegah Simpan”

Pertanyaan yang mirip dengan “Excel VBA Cegah Simpan”

Lebih banyak jawaban terkait untuk “Excel VBA Cegah Simpan” di VBA

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya