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.

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!

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!!!!!!!!!!!!!!!!!!!!!!!

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

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 2 Years Ago by Learner010

This article has been dead for over six months. Start a new discussion instead.