I need to know how to add, subtract, multiply and divide using vb5.0. I'm converting timer seconds into min.
http://forums.codeguru.com/Thankz, Drew
[email protected]
Printable View
I need to know how to add, subtract, multiply and divide using vb5.0. I'm converting timer seconds into min.
http://forums.codeguru.com/Thankz, Drew
[email protected]
Dim numberOne as Integer
Dim numberTwo as Integer
Dim result as Integer
Sub math()
numberOne = 5
numberTwo = 10
'Addition (result will be 5 + 10 = 15)
result = numberOne + numberTwo
'Substraction (result will be 10 - 5 = 5)
result = numberTwo - numberOne
'Division (result will be 10 / 5 = 2)
result = numberTwo / numberOne
'Multiplication (result will be 5 * 10 = 50)
result = numberOne * numberTwo
End Sub
----------------
You can contact me directly at [email protected]
Hey, and... don't forget your parsley cause you can't eat your dog after having stolen him from some animal shelter and having drowned him in the Atlantic Ocean.
how ever if you are directly adding/substructing/multiplying two nubers in two textboxes you have to use the val function.
text3.text=val(text1.text)+val(text2.text)
text3.text=val(text1.text)-val(text2.text)
text3.text=val(text1.text)*val(text2.text)