Question: Visual Basic Applications (VBA) Help! Its a Friday night in College Station and you decide to throw a pizza party for all your ISEN 230

Visual Basic Applications (VBA) Help!

Its a Friday night in College Station and you decide to throw a pizza party for all your ISEN 230 friends. You need to figure out how many pizzas to order and decide to use your newfound VBA passion to do so.

Step 1: Gather Inputs and Validate Numbers

Write a macro that asks how many people are coming to your party and assign the input to a variable. Next, the macro will ask how many slices of pizza each person will eat and assign the input to a new variable. Finally, the macro will ask how many slices of pizza will be ordered and assign the input to a new variable. If any of the inputs is not a number (Hint: use IsNumeric() function to check) , have a message pop up with a critical sign indicating that the input was invalid.

Step 2: Calculation and Give Feedback

If all three inputs are valid, make calculation to decide if enough slices have been ordered. If yes, have a message box pop up which indicates the number of slices ordered, the amount each person can eat, and how many slices will be left over. If not, have a message box pop up indicating that ordered amount of slices wasnt enough and how many more slices you will need to order.

Outputs should look something like this:

Visual Basic Applications (VBA) Help! Its a Friday night in College Station

Victor Mulanovich Invalid Input How many people are coming to your pizza party? OK (Ox.15) is not a number Please try again. OK Victor Mulanovich Invalid Input How many slices of pizza will each person eat? OK (Rambo) is not a number Please try again. Cancel OK Victor Mulanovich Invalid Input How many slices of pizza will you order? OK (3.3.CecH) is not a number Please try again. Cancel OK Victor Mulanovich Ordering 150 slices of pizza will guarantee atleast1 pizza(s) per person You will have 50 slices left over OK Victor Mulanovich Ordering 80 slices of pizza is not enough. You will need to order 120 more slices. OK

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!