dai meandri della rete... vedi un po se ti e' utile
codice:
Function GetArray(ByVal array() As Integer) As Integer() 
Dim x, y, n, sa() As Integer 
y = -1 
n = 0 
array.Sort(array) 
For Each x In array 
If x <> y Then 
ReDim Preserve sa(n) 
sa(n) = x 
y = x 
n += 1 
End If 
Next 
Return sa 
End Function