0

How to add, subtract, multiply and divide 2 different numbers from 2 different form. Pls help me. The code i think is way too simple example: (Result.text = result) (Text1.text = number from form2)(Text2,text = Number from form3). the code i think is like this and this one is not working:

Public Sub Command1_Clicked()
Result.text = Val(Text1.Text) + Val(Text2.text)
End Sub

Pls help me... i cant sleep because of this problem.

6
Contributors
6
Replies
53
Views
8 Years
Discussion Span
Last Post by Reverend Jim
0

How to add, subtract, multiply and divide 2 different numbers from 2 different form. Pls help me. The code i think is way too simple example: (Result.text = result) (Text1.text = number from form2)(Text2,text = Number from form3). the code i think is like this and this one is not working:

Public Sub Command1_Clicked()
Result.text = Val(Text1.Text) + Val(Text2.text)
End Sub

Pls help me... i cant sleep because of this problem.

Try

Public Sub Command1_Clicked()
Result.text = Val(Form2.Text1.Text) + Val(Form3.Text2.text)
End Sub

Now go to bed!

0

Try

Public Sub Command1_Clicked()
Result.text = Val(Form2.Text1.Text) + Val(Form3.Text2.text)
End Sub

Now go to bed!

Thank You Very Much!!!!!!!!!!!!!!!!!!!!!!!

0

Can I be able to write a simple program to accept two numbers in one textbox including an operator +,-,/,*, using vb 2010

0

Can I be able to write a simple program to accept two numbers in one textbox including an operator +,-,/,*, using vb 2010

yes , it can be written and in fact its very easy to achieve , you just need to put 2 textboxes and 1 command button and make use of arithmetic operators.

you can also accept these numbers using inputbox.

for further assistance , i highly recommend you to post the question in appropriate thread , we have seperate forum for vb.net.

Edited by Learner010

0

pls anyone tell me what is the error in this code for (n=a1-a3)

Dim a1, a2, a3, a4, x, n As Integer
Private Sub Command1_Click()
a1 = Val(Text1.Text)
a2 = Val(Text2.Text)
a3 = Val(Text3.Text)
a4 = Val(Text4.Text)
x = a3 + a2 - a4
n = a1 - a3
Text5.Text = x
Text6.Text = n
End Sub

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.