juggernot
Well-known member
- Joined
- Sep 28, 2006
- Messages
- 173
- Programming Experience
- Beginner
hi, I'm just starting out learing VB.net, and I had a question about an example from my class at school. I'm supposed to find the projected sales for a company. I have a textbox for current sales and projected increase(as a percent). My code looks like this:
me.label1.Text = me.SalesTextBox.Text * me.IncrTextBox + Val(me.SalesTextBox.Text)
That works great, but I want the user to input a number between 1-100 for the percent, not a decimal. So I need to divide the value of the
me.IncrTextBox.Text by 100. I've tried doing this, but no matter how I try I come into an error. Can somone tell me the correct Code for what I'm trying to do?
me.label1.Text = me.SalesTextBox.Text * me.IncrTextBox + Val(me.SalesTextBox.Text)
That works great, but I want the user to input a number between 1-100 for the percent, not a decimal. So I need to divide the value of the
me.IncrTextBox.Text by 100. I've tried doing this, but no matter how I try I come into an error. Can somone tell me the correct Code for what I'm trying to do?