
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Vuoi davvero chiudere il file?", vbYesNo + vbExclamation, "ATTENZIONE!") <> vbYes Then Cancel = True
End Sub
|
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
End Sub
|
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Conferma As Integer
Conferma = MsgBox(ThisWorkbook.Name & ": salvare questa cartella prima di chiudere?", vbInformation + vbYesNoCancel)
If Conferma = vbYes Then
ThisWorkbook.Save
ElseIf Conferma = vbCancel Then
Cancel = True
End If
End Sub |
