There are two textboxes, TextBox 1 and TextBox 2. So the price of 1 value of Textbox 1 is $5 while Textbox 2's price of 1 value is $10. So if I put 4 in Textbox 1, then it'll be multiplied to $5 so $20. But the problem here is that there's only one Textbox to show the Total Amount :( (Sorry, I'm just a young fellow who is new to VB. teaching myself :(Doing basics :( )
Melon Lord
0
Newbie Poster
Recommended Answers
Jump to PostWhenever the user changes either text box just update the total amount to
$5 x (number in box 1) + $10 x (number in box 2)
Jump to PostYou can achieve this by simply using the 'IF' statement. Try this out.
REM: Check if not both TextBox1 and TextBox2 are empty. If TextBox1.Text IsNot Nothing Then REM: TextBox1 is not empty so we know we can use this control. Dim Result As Double Result …
All 8 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Mr.M
58
Future Programmers
Melon Lord
0
Newbie Poster
Melon Lord
0
Newbie Poster
Mr.M
58
Future Programmers
taersious
0
Gn00b
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Melon Lord
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.