Bonsoir Damien, Michel et le Forum
On peut compléter l'info donnée par Michel comme ceci :
Dans le Private Module de ThisWorkBook :
Private Sub Workbook_Open()
CancelSortie = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = CancelSortie
End Sub
Dans un Module Standard :
Public CancelSortie As Boolean
Sub LaSortie()
CancelSortie = False
ThisWorkbook.Close True
End Sub
On notera ici l'usage d'une variable "CancelSortie" Publique de type Boolean et, bien sûr, on prendra soin de mettre un bouton de sortie qui lancera cette macro "LaSortie". (dans l'exemple on sauve le classeur, sinon mettre à false)
Bonne Soirée
@+Thierry