bonjour j'ai ceci :
et ce code là
Code : Sélectionner tout - Visualiser dans une fenêtre à part Formulaire1.Date_du_jour.Value = Format(DateSerial(Year(DtPicker1), Month(DtPicker1), Day(DtPicker1)), "dd/mm/yyyy")
mais cela trie bien le jour mais pas le mois correctement avez vous une idée svp
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 Private Sub Trie_par_date_Click() Application.EnableEvents = False Application.ScreenUpdating = False With ThisWorkbook.Worksheets("Bilan") .Sort.SortFields.Clear .Sort.SortFields.Add Key:=.Range("C9"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal .Sort.SetRange .Range("C8:Q5000") With .Sort .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End With Application.EnableEvents = True End Sub
Partager