|
-
September 21st, 2001, 06:40 PM
#1
Math
I need to know how to add, subtract, multiply and divide using vb5.0. I'm converting timer seconds into min.
Thankz, Drew
[email protected]
Thanks, Drew
-
September 22nd, 2001, 05:49 AM
#2
Re: Math
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.
-
September 22nd, 2001, 06:59 AM
#3
Re: Math
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|