Goat shirts

Tags
Challenge
No

Goat

Paula Poundstone is selling shirts for goats on her website. The shirts are made of a remarkably soft tri-poly blend that goats adore. Write a VBA program to compute the cost of an order. The worksheet starts like this (you can download) it):

Start

Customers enter the number of small, medium, and large goat shirts they want. The values must be numeric, and greater than zero. If they aren't, show error messages, like this:

Output

Of course, once an error is fixed, its message should go away. Only show the output if all input is valid.

Shipping can be done by Bonnie, or Toni. Bonnie is cheaper, but her attention wanders. Toni is more likely to get the job done quickly.

The user should enter B or T in the shipping field. Case and extra spaces don't matter. If the user enters something else, show an error message, as shown.

If all the data is OK, compute the total cost. Here are some examples.

Output

Output

Large shirts sell for $28 each, medium for $25, and small for $22. Shipping is $2 per shirt for Bonnie, and $3 per shirt for Toni.

Upload your solution. The usual coding standards apply.

Where referenced