Public Function Arr16() As Variant
Dim str As String
Dim i As Integer
Dim s As String
Dim Res As String
Const SPL As String = " "
Const ONE As Integer = 1
Randomize
str = "0123456789ABCDEF"
For i = ONE To 16
s = Mid$(str, Rnd() * (Len(str) - ONE) + ONE, ONE)
Res = Res & SPL & Val("&H" & s)
str = Replace(str, s, vbNullString)
Next i
Debug.Print Res
Arr16 = Split(Res, SPL)
End Function
|