Private Number(100) As Boolean
Private cNumber As Long
Private Sub Command1_Click()
Dim a As Long
Dim i As Long
i = 0
Randomize
Do While (i = 0)
Re:
a = Int(Rnd * 100) + 1
If Number(a) = False Then
Number(a) = True
If a >= 1 And a <= 50 Then
Text1.Text = Text1.Text + "1"
ElseIf a >= 51 And a <= 80 Then
Text1.Text = Text1.Text + "2"
Else
Text1.Text = Text1.Text + "3"
End If