|
-
Feb 12th, 2008, 11:17 PM
#11
Lively Member
Re: I need SIMPLE VB help (really easy question)
'Add these Code to correspoding button click event
' To add (+)
Me.lblAnswer.Text = iif(trim(txtBox1.text)="",0,Val(txtBox1.text)) + iif(trim(txtBox2.text)="",0,Val(txtBox2.text))
' To Subtract (-)
Me.lblAnswer.Text = iif(trim(txtBox1.text)="",0,Val(txtBox1.text)) - iif(trim(txtBox2.text)="",0,Val(txtBox2.text))
' To Multiply (*)
Me.lblAnswer.Text = iif(trim(txtBox1.text)="",0,Val(txtBox1.text)) * iif(trim(txtBox2.text)="",0,Val(txtBox2.text))
' To Devide (/)
Me.lblAnswer.Text = iif(trim(txtBox1.text)="",0,Val(txtBox1.text)) / iif(trim(txtBox2.text)="",0,Val(txtBox2.text))
Hope this solves your problem, Good Luck
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
|