a = Str(100000 * Rnd() Mod 52 + 1) dim blnHave as boolean blnhave=falseFor i = 1 To 52 if a <>list1. then blnhave=true exit for end if next iif not blnhave then List1.AddItem a end if
Dim s As Integer s = 0 For i = 0 To List1.ListCount If a = List1.List(i) Then s = 1 Exit For End If Next If s = 0 Then List1.AddItem a End If
blnhave=falseFor i = 1 To 52
if a <>list1. then
blnhave=true
exit for
end if
next iif not blnhave then
List1.AddItem a
end if
s = 0
For i = 0 To List1.ListCount
If a = List1.List(i) Then
s = 1
Exit For
End If
Next
If s = 0 Then
List1.AddItem a
End If