Results 1 to 19 of 19

Thread: Mathematics

Threaded View

  1. #13

    Thread Starter
    Addicted Member adamlonsdale's Avatar
    Join Date
    Oct 2005
    Posts
    210

    Re: Mathematics

    Okay this is getting confusing, with saving an what not. So ive added my updated project. I have tried many methods, but i still cannot fix my problem. When i click the check button, it says incorrect no matter what the answer is.

    Also here is the code:

    Form 1:

    Code:
    Private Sub Form_Load()
    Dim TB1 As Integer: Dim TB2 As Integer
    Text1.Caption = TB1 + TB2
    Randomize Timer
    TB1 = Rnd(0 + 1) * 100
    Text1.Caption = TB1
    TB2 = Rnd(0 + 1) * 100
    Text2.Caption = TB2
    End Sub
    Private Sub Command1_Click()
    Dim TB1 As Integer: Dim TB2 As Integer
    Randomize Timer
    TB1 = Rnd(0 + 1) * 100
    Text1.Caption = TB1
    TB2 = Rnd(0 + 1) * 100
    Text2.Caption = TB2
    End Sub
    Private Sub Command2_Click()
    Form2.Show
    End Sub
    Form 2:

    Code:
    Private Sub Form_Load()
    Dim form1 As New form1
    lblOutput.Caption = IIf(form1.Text1 + form1.Text2 = form1.Text2, "Correct", "Incorrect")
    End Sub
    Private Sub Command1_Click()
    Form2.Hide
    End Sub
    Attached Files Attached Files
    Last edited by adamlonsdale; Mar 10th, 2007 at 06:38 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width