Private Sub Workbook_Activate()
Application.CommandBars("Ply").Enabled = False
End Sub
Private Sub Workbook_Deactivate()
Application.CommandBars("Ply").Enabled = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim ret As Integer
ret = MsgBox("Souhaitez vous fermer ce classeur ?", vbYesNo + vbInformation, "TEST")
If ret = vbNo Then
Cancel = True
Else
ThisWorkbook.Saved = True
End If
End Sub