allthough i know many computer languages VB is not my speciallity.so i just want to create a simple program that adds two numbers that we type from keyboard and prints the result.my problem is that i don't know how can i input these nums.
any help would be really appreciated
Comments
:
: any help would be really appreciated
:
Stick three textboxes on a form and a command button. Name the third textbox txt_Result. Set the caption of the command button to "Find Sum"
Add the following code to your form:
[code]
Private Sub Command1_Click()
if text1.text = vbnullstring OR text2.text = vbnullstring then
msgbox "Please enter a number in each textbox."
exit sub
end if
txt_Result.text = Val(text1.text) + Val(text2.text)
End Sub
[/code]