Dim tmps As String tmps="|" Randomize 'initialize the random generator Dim i As Integer,tmpI As Integer Do ' 原 For i=1 to 10 Tmpi=Int((100 - 1 + 1) * Rnd + 1) If Instr(1,tmps,"|" & Tmpi & "|")=0 Then tmps=tmps & tmpi & "|" End If Loop Until UBound(split(tmps,"|"))=12 '12=10+2 ' 原 Next Dim result() As Integer Result=split(tmps,"|")