Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim der
With Sheets("xxxxx")
der = Application.Max(Application.IfError(Application.Match(9 ^ 99, .Columns(1)), 0), Application.IfError(Application.Match(String(255, "z"), .Columns(1)), 0)) + 1
.Cells(der, "a") = Application.UserName
.Cells(der, "b").NumberFormat = "ddd dd-mmm-yyyy"
.Cells(der, "b") = Date
.Cells(der, "c").NumberFormat = "hh-mm-ss"
.Cells(der, "c") = Time
End With
End Sub
Hello,Bonsoir @kitty73 ,
VB:Private Sub Workbook_BeforePrint(Cancel As Boolean) .Cells(der, "a") = Application.UserName
Bonjour @Cousinhub ,je préfère utiliser "Environ("username")"