MsgBox "wrong input" ElseIf Text1.Text = 1 And Text2.Text = 1 Then frm1.Show Form1.Visible = False ElseIf Text1.Text = 2 And Text2.Text = 2 Then frm2.Show Form1.Visible = False ElseIf Text1.Text = 3 And Text2.Text = 3 Then frm3.Show ElseIf Text1.Text = 4 And Text2.Text = 4 Then Form3.Show ElseIf Text1.Text = 5 And Text2.Text = 5 Then Form4.Show ElseIf Text1.Text = 6 And Text2.Text = 6 Then Form5.Show ElseIf Text1.Text = 7 And Text2.Text = 7 Then Form6.Show ElseIf Text1.Text = 8 And Text2.Text = 8 Then Form7.Show Form7.Text1.SetFocus ElseIf Text1.Text = 9 And Text2.Text = 9 Then Form8.Show Form8.Text1.SetFocus ElseIf Text1.Text = 10 And Text2.Text = 10 Then Form9.Show Form9.Text1.SetFocus End If End Sub