Private Sub CommandButton1_Click()
If Val(Application.Version) >= 12 Then 'test la version d'excel
[G4] = ">=" & Format(TextBox1, "mm/dd/yyyy")
[H4] = "<=" & Format(TextBox2, "mm/dd/yyyy")
Else
[G4] = ">=" & TextBox1
[H4] = "<=" & TextBox2
End If
lig = Sheets("Données").Range("A" & Rows.Count).End(xlUp).Row 'detecte la dernière ligne dans la feuille données
Sheets("Données").Range("A1:D" & lig).AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=[G3:H4], CopyToRange:=[d22:G22] ' applique le filtre avec les dates selectionnées
Range("C22:J60").Font.Size = 8 'affecte la taille 8 à la plage C22:j60
End Sub