Bonsoir,
Deux exemples en utilisant la collection ArrayList.
Option Explicit
Dim objArrayList, result, i
Set objArrayList = CreateObject("System.Collections.ArrayList")
For i=0 To 9
Randomize
objArrayList.Add Int(10 * Rnd) + 1
Next
objArrayList.Sort
objArrayList.Reverse
For i=0 To objArrayList.Count-1
result = result &vbCr& objArrayList(i)
Next
Set objArrayList = Nothing
MsgBox result
Option Explicit
Dim objArrayList, result, i
Set objArrayList = CreateObject("System.Collections.ArrayList")
objArrayList.Add 12
objArrayList.Add 4
objArrayList.Add 8
objArrayList.Add 15
objArrayList.Add 1
objArrayList.Add 112
objArrayList.Add 6
objArrayList.Add 100
objArrayList.Add 10
objArrayList.Add 99
objArrayList.Sort
objArrayList.Reverse
For i=0 To objArrayList.Count-1
result = result &vbCr& objArrayList(i)
Next
Set objArrayList = Nothing
MsgBox result
Documentation sur http://www.robvanderwoude.com/files/arraylist_vbs.txt
jean-marc