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 PostTextBox.Text values are strings and should be tested/converted to numeric before trying a calculation. Either that or the operation should be done within a Try/Catch block.
All 8 Replies
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Mr.M 89 Future Programmers
Melon Lord 0 Newbie Poster
Melon Lord 0 Newbie Poster
Mr.M 89 Future Programmers
taersious 0 Gn00b
Reverend Jim 5,225 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.