Option Explicit
Private Sub Command1_Click() Randomize Dim StrTxt2 As String Text1.Text = CStr(Int(Rnd * 100))strLoop: StrTxt2 = CStr(Int(Rnd * 100)) If StrTxt2 = Text1.Text Then GoTo strLoop Else Text2.Text = StrTxt2 End IfEnd Sub