Salut Sylvie,
Pour la MsgBox
Sub FiltreDonnées()
'
' FiltreDonnées Macro
'
Sheets("Données").Range("TDonnées[#All]").AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Range("'Accueil'!Criteres"), _
CopyToRange:=Range("'Accueil'!Extraire"), _
Unique:=False
With Worksheets("Accueil")
.[D12].Select
If .[D16] = "" Then MsgBox "Aucun lot n° " & .[D13] & " n'a été trouvé !", vbInformation + vbOKOnly, "Suivi des lots"
End With
'
End Sub
Pour ta sauvegarde
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'
Dim sPath$, sFile$
'
sPath = "C:\Users\BIO7\Documents\STOCK\"
sFile = Day(Date) & "-" & Month(Date) & "-" & Year(Date) & "_" & "SuiviLots.xlsm"
'
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs sPath & sFile
Application.DisplayAlerts = True
'
MsgBox "Votre fichier de sauvegarde intitulé : " & sFile & Chr(10) & _
"se trouve dans le dossier suivant :" & sPath, vbOKOnly + vbInformation, "CONFIRMATION"
'
End Sub
A+