1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Macro Feuil1
Private Sub Worksheet_Change(ByVal Target As Range)
ThisWorkbook.feuil1change
End Sub
Macro Workbook
Dim modifFeuil1 As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim DateRevision1 As String
DateRevision1 = Mid(Sheets("Feuil1").Range("A2").Value, 22, Len(Sheets("Feuil1").Range("A2").Value))
Application.EnableEvents = False
If modifFeuil1 = True Then
Sheets("Feuil1").Range("A1").Value = "Révision R-1 le " & Chr(13) + Chr(10) & DateRevision1
Sheets("Feuil1").Range("A2").Value = "Dernière Révision le " & Format(Date, "dd/mm/yyyy") & " à " & Hour(Now) & ":" & Minute(Now) & ":" & Second(Now) & " par " & Environ("username")
End If
Application.EnableEvents = True
End Sub
Public Sub feuil1change()
modifFeuil1 = True
End Sub |
Partager