|
-
May 14th, 2013, 05:41 PM
#1
Thread Starter
New Member
Need some help with a project
Hey guys, I need help doing a project, and I can't seem to get this one right. I was wondering if someone could guide me through the steps so I can complete it?
The form looks like this:

And needs to calculate prices, with labels being the output like this:

And here is a table of how the prices should be:
Quantity | | Price per widget
1 - 10 | | $20.00
11 - 20 | | $18.00
21 - 30 | | $16.00
31 + | | $14.00
My apologies if this doesn't seem like it makes sense, I'm rushing but I will gladly explain for specifics.
-
May 14th, 2013, 09:12 PM
#2
Re: Need some help with a project
You can use Integer.TryParse to convert the user input to an Integer and then a Select Case statement to decide on the price bracket:
Code:
Select Case itemCount
Case Is > 30
'31 +
Case Is > 20
'21 - 30
Case Is > 10
'11 - 20
Case Else
'0 - 10
End Select
-
May 14th, 2013, 09:22 PM
#3
Thread Starter
New Member
Re: Need some help with a project
I tried using Integer.TryParse, but it only resulted in an error.
-
May 14th, 2013, 09:34 PM
#4
Re: Need some help with a project
 Originally Posted by Kaio
I tried using Integer.TryParse, but it only resulted in an error.
Then you did it wrong. We're not going to know what you did wrong by ESP though. You have to tell us what you did and what happened when you did it. Assume that we know nothing about your project other than what you tell us, which is exactly the case.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|