Private Sub Command1_Click() by r4NxxJ3V

VIEWS: 38 PAGES: 7

									                         The Test Taker Code

Module1 Code
'Variable Declarations              Form2.Text10.Visible = True
  Public A As Integer               Form2.Text11.Visible = True
  Public B As Integer               Form2.Text12.Visible = True
  Public X As Integer               Form2.Text13.Visible = True
  Public Y As Integer               Form2.Text14.Visible = True
'End of Declarations                Form2.Text15.Visible = True
                                    Form2.Text16.Visible = True
Sub Main()                          Form2.Text17.Visible = True
                                    Form2.Text18.Visible = True
Form1.Show                          Form2.Text19.Visible = True
                                    Form2.Text20.Visible = True
Form3.Option4.Value = True
X = 20                              Form3.Option7.Value = True
Form3.Label3.Caption = 20           Y=4
Form2.Text0.Visible = True          Form3.Label4.Caption = 4
Form2.Text1.Visible = True
Form2.Text2.Visible = True          Form4.Text1.Text = 51
Form2.Text3.Visible = True          Form4.Text2.Text = 75
Form2.Text4.Visible = True          A = 51
Form2.Text5.Visible = True          B = 75
Form2.Text6.Visible = True          Form4.Label7.Caption = 51
Form2.Text7.Visible = True          Form4.Label8.Caption = 75
Form2.Text8.Visible = True
Form2.Text9.Visible = True          End Sub

Form1 Code
Private Sub Command1_Click()        Private Sub Command2_Click()
Form2.Show                          End
Form1.Hide                          End Sub
End Sub
Form2 Code
Private Sub Command1_Click()   Form4.Label8.Caption = 75
Form3.Show
End Sub                        End Sub

Private Sub Command2_Click()   Private Sub Command7_Click()
Form4.Show
End Sub                        Randomize

Private Sub Command4_Click()   Dim N As Long
                               N = Text29.Text
Form3.Option4.Value = True
X = 20                         Dim P As Single
Form3.Label3.Caption = 20      Dim G As Single
Form2.Text0.Visible = True     P = A * X / 100
Form2.Text1.Visible = True     G = B * X / 100
Form2.Text2.Visible = True
Form2.Text3.Visible = True     Text21.Text = 0
Form2.Text4.Visible = True     Text22.Text = 0
Form2.Text5.Visible = True     Text23.Text = 0
Form2.Text6.Visible = True     Text24.Text = 0
Form2.Text7.Visible = True
Form2.Text8.Visible = True     For T = 1 To N
Form2.Text9.Visible = True       For Q = 1 To X
Form2.Text10.Visible = True         R = Int((Rnd * Y) + 1)
Form2.Text11.Visible = True         If R = 1 Then Text21.Text =
Form2.Text12.Visible = True    Text21.Text + 1
Form2.Text13.Visible = True         If R <> 1 Then Text22.Text =
Form2.Text14.Visible = True    Text22.Text + 1
Form2.Text15.Visible = True      Next Q
Form2.Text16.Visible = True
Form2.Text17.Visible = True      Text23.Text = Text21.Text
Form2.Text18.Visible = True
Form2.Text19.Visible = True      Text24.Text = Text23.Text / X * 100
Form2.Text20.Visible = True
                                   If Text23.Text >= P Then
Form3.Option7.Value = True            Text25.Text = Text25.Text + 1
Y=4                                ElseIf Text23.Text < P Then
Form3.Label4.Caption = 4              Text26.Text = Text26.Text + 1
                                   End If
Form4.Text1.Text = 51
Form4.Text2.Text = 75              If Text23.Text >= G Then
A = 51                                Text27.Text = Text27.Text + 1
B = 75                             ElseIf Text23.Text < G Then
Form4.Label7.Caption = 51             Text28.Text = Text28.Text + 1
End If                                 If Val(T) <> Val(N) Then
                                          Text21.Text = 0
If Text23.Text = 0 Then                   Text22.Text = 0
   Text0.Text = Text0.Text + 1            Text23.Text = 0
ElseIf Text23.Text = 1 Then               Text24.Text = 0
   Text1.Text = Text1.Text + 1         End If
ElseIf Text23.Text = 2 Then
   Text2.Text = Text2.Text + 1     Next T
ElseIf Text23.Text = 3 Then
   Text3.Text = Text3.Text + 1     End Sub
ElseIf Text23.Text = 4 Then
   Text4.Text = Text4.Text + 1     Private Sub Command8_Click()
ElseIf Text23.Text = 5 Then        End
   Text5.Text = Text5.Text + 1     End Sub
ElseIf Text23.Text = 6 Then
   Text6.Text = Text6.Text + 1     Private Sub Command9_Click()
ElseIf Text23.Text = 7 Then        Form2.Hide
   Text7.Text = Text7.Text + 1     Form1.Show
ElseIf Text23.Text = 8 Then        End Sub
   Text8.Text = Text8.Text + 1
ElseIf Text23.Text = 9 Then        Private Sub Command5_Click()
   Text9.Text = Text9.Text + 1     Text0.Text = 0
ElseIf Text23.Text = 10 Then       Text1.Text = 0
   Text10.Text = Text10.Text + 1   Text2.Text = 0
ElseIf Text23.Text = 11 Then       Text3.Text = 0
   Text11.Text = Text11.Text + 1   Text4.Text = 0
ElseIf Text23.Text = 12 Then       Text5.Text = 0
   Text12.Text = Text12.Text + 1   Text6.Text = 0
ElseIf Text23.Text = 13 Then       Text7.Text = 0
   Text13.Text = Text13.Text + 1   Text8.Text = 0
ElseIf Text23.Text = 14 Then       Text9.Text = 0
   Text14.Text = Text14.Text + 1   Text10.Text = 0
ElseIf Text23.Text = 15 Then       Text11.Text = 0
   Text15.Text = Text15.Text + 1   Text12.Text = 0
ElseIf Text23.Text = 16 Then       Text13.Text = 0
   Text16.Text = Text16.Text + 1   Text14.Text = 0
ElseIf Text23.Text = 17 Then       Text15.Text = 0
   Text17.Text = Text17.Text + 1   Text16.Text = 0
ElseIf Text23.Text = 18 Then       Text17.Text = 0
   Text18.Text = Text18.Text + 1   Text18.Text = 0
ElseIf Text23.Text = 19 Then       Text19.Text = 0
   Text19.Text = Text19.Text + 1   Text20.Text = 0
ElseIf Text23.Text = 20 Then       Text21.Text = 0
   Text20.Text = Text20.Text + 1   Text22.Text = 0
End If                             Text23.Text = 0
                                   Text24.Text = 0
Text25.Text = 0                           20 If Text29.Text < 0 Or Text29.Text >
Text26.Text = 0                           1000000 Then Text29.Text = 0
Text27.Text = 0                           End Sub
Text28.Text = 0
End Sub                                   Private Sub Text29_KeyPress(KeyAscii
                                          As Integer)
Private Sub Command6_Click()                If (KeyAscii < 48 Or KeyAscii > 57)
Text29.Text = 0                           And KeyAscii <> 8 Then
End Sub                                        KeyAscii = 0
                                            End If
Private Sub Text29_Change()               End Sub
10 If Text29.Text = "" Then Text29.Text
=0
Form3 Code
Private Sub Command1_Click()   Form2.Text8.Visible = False
                               Form2.Text9.Visible = False
If Option1.Value = True Then   Form2.Text10.Visible = False
X=5                            Form2.Text11.Visible = False
Label3.Caption = 5             Form2.Text12.Visible = False
End If                         Form2.Text13.Visible = False
If Option2.Value = True Then   Form2.Text14.Visible = False
X = 10                         Form2.Text15.Visible = False
Label3.Caption = 10            Form2.Text16.Visible = False
End If                         Form2.Text17.Visible = False
If Option3.Value = True Then   Form2.Text18.Visible = False
X = 15                         Form2.Text19.Visible = False
Label3.Caption = 15            Form2.Text20.Visible = False
End If                         End If
If Option4.Value = True Then
X = 20                         If X = 10 Then
Label3.Caption = 20            Form2.Text0.Visible = True
End If                         Form2.Text1.Visible = True
If Option5.Value = True Then   Form2.Text2.Visible = True
Y=2                            Form2.Text3.Visible = True
Label4.Caption = 2             Form2.Text4.Visible = True
End If                         Form2.Text5.Visible = True
If Option6.Value = True Then   Form2.Text6.Visible = True
Y=3                            Form2.Text7.Visible = True
Label4.Caption = 3             Form2.Text8.Visible = True
End If                         Form2.Text9.Visible = True
If Option7.Value = True Then   Form2.Text10.Visible = True
Y=4                            Form2.Text11.Visible = False
Label4.Caption = 4             Form2.Text12.Visible = False
End If                         Form2.Text13.Visible = False
If Option8.Value = True Then   Form2.Text14.Visible = False
Y=5                            Form2.Text15.Visible = False
Label4.Caption = 5             Form2.Text16.Visible = False
End If                         Form2.Text17.Visible = False
                               Form2.Text18.Visible = False
If X = 5 Then                  Form2.Text19.Visible = False
Form2.Text0.Visible = True     Form2.Text20.Visible = False
Form2.Text1.Visible = True     End If
Form2.Text2.Visible = True
Form2.Text3.Visible = True     If X = 15 Then
Form2.Text4.Visible = True     Form2.Text0.Visible = True
Form2.Text5.Visible = True     Form2.Text1.Visible = True
Form2.Text6.Visible = False    Form2.Text2.Visible = True
Form2.Text7.Visible = False    Form2.Text3.Visible = True
Form2.Text4.Visible = True     Form2.Text17.Visible = True
Form2.Text5.Visible = True     Form2.Text18.Visible = True
Form2.Text6.Visible = True     Form2.Text19.Visible = True
Form2.Text7.Visible = True     Form2.Text20.Visible = True
Form2.Text8.Visible = True     End If
Form2.Text9.Visible = True
Form2.Text10.Visible = True    Form3.Hide
Form2.Text11.Visible = True    Form2.Show
Form2.Text12.Visible = True
Form2.Text13.Visible = True    End Sub
Form2.Text14.Visible = True
Form2.Text15.Visible = True    Private Sub Command2_Click()
Form2.Text16.Visible = False
Form2.Text17.Visible = False   If Label3.Caption = "" Then GoTo 100
Form2.Text18.Visible = False   If Label3.Caption = 5 Then
Form2.Text19.Visible = False   Option1.Value = True
Form2.Text20.Visible = False   If Label3.Caption = 10 Then
End If                         Option2.Value = True
                               If Label3.Caption = 15 Then
If X = 20 Then                 Option3.Value = True
Form2.Text0.Visible = True     If Label3.Caption = 20 Then
Form2.Text1.Visible = True     Option4.Value = True
Form2.Text2.Visible = True     If Label4.Caption = "" Then GoTo 100
Form2.Text3.Visible = True     If Label4.Caption = 2 Then
Form2.Text4.Visible = True     Option5.Value = True
Form2.Text5.Visible = True     If Label4.Caption = 3 Then
Form2.Text6.Visible = True     Option6.Value = True
Form2.Text7.Visible = True     If Label4.Caption = 4 Then
Form2.Text8.Visible = True     Option7.Value = True
Form2.Text9.Visible = True     If Label4.Caption = 5 Then
Form2.Text10.Visible = True    Option8.Value = True
Form2.Text11.Visible = True
Form2.Text12.Visible = True    100 Form3.Hide
Form2.Text13.Visible = True    110 Form2.Show
Form2.Text14.Visible = True
Form2.Text15.Visible = True    End Sub
Form2.Text16.Visible = True
Form4 Code
Private Sub Command1_Click()                If (KeyAscii < 48 Or KeyAscii > 57)
                                          And KeyAscii <> 8 Then
A = Text1.Text                                 KeyAscii = 0
B = Text2.Text                              End If
Label7.Caption = Text1.Text               End Sub
Label8.Caption = Text2.Text

Form4.Hide
Form2.Show

End Sub

Private Sub Command2_Click()

Text1.Text = Label7.Caption
Text2.Text = Label8.Caption

Form4.Hide
Form2.Show

End Sub

Private Sub Text1_Change()
If Text1.Text = "" Then Text1.Text = 51
If Text1.Text < 0 Or Text1.Text > 100
Then Text1.Text = 51
End Sub

Private Sub Text1_KeyPress(KeyAscii
As Integer)
  If (KeyAscii < 48 Or KeyAscii > 57)
And KeyAscii <> 8 Then
     KeyAscii = 0
  End If
End Sub

Private Sub Text2_Change()
If Text2.Text = "" Then Text2.Text = 75
If Text2.Text < 0 Or Text2.Text > 100
Then Text2.Text = 75
End Sub

Private Sub Text2_KeyPress(KeyAscii
As Integer)

								
To top