tomsmith19
10-25-2004, 12:12 PM
hi, im tryin to create a basic maths tutor program, that will randomly pick a number between 1-12 and either add (+) or multiply (x) it.
iv got:
Dim num1 As Double
Dim num2 As Double
Private Sub plus()
num1 = Int(1 + 12 = Rnd())
num2 = Int(1 + 12 = Rnd())
opname = "plus"
End Sub
and:
Private Sub Form_Load()
Call plus
Label1.Caption = "What is " & num1 + opname & num2
End Sub
and i want it to randomly pick numbers and then u have to put the answer in a text box and click ok, then a message will pop up sayin if its right or wrong.
the problem im havin is wit the 'opname'. when i run the program this isnt recognised and if i declare it it causes problems!
any1 know how 2 sort this pls?
iv got:
Dim num1 As Double
Dim num2 As Double
Private Sub plus()
num1 = Int(1 + 12 = Rnd())
num2 = Int(1 + 12 = Rnd())
opname = "plus"
End Sub
and:
Private Sub Form_Load()
Call plus
Label1.Caption = "What is " & num1 + opname & num2
End Sub
and i want it to randomly pick numbers and then u have to put the answer in a text box and click ok, then a message will pop up sayin if its right or wrong.
the problem im havin is wit the 'opname'. when i run the program this isnt recognised and if i declare it it causes problems!
any1 know how 2 sort this pls?