Re le forum
Pour ta ListBox, une façon de faire
Private Sub CommandButton1_Click()
Dim c As Range
Dim tablo()
Dim i As Integer, j As Integer
Dim temp As String
Dim present As Boolean
ReDim tablo(1 To 1)
tablo(1) = Sheets("Resultat").Range("A4")
For Each c In Sheets("Resultat").Range("A4:A11")
present = False
For i = 1 To UBound(tablo)
If tablo(i) = c Then present = True
Next i
If Not present Then
ReDim Preserve tablo(1 To UBound(tablo) + 1)
tablo(UBound(tablo)) = c
End If
For i = 1 To UBound(tablo)
For j = 1 To UBound(tablo)
If tablo(i) < tablo(j) Then
temp = tablo(i)
tablo(i) = tablo(j)
tablo(j) = temp
End If
Next j
Next i
Next c
ListBox1.List = tablo
End Sub
Mytå