Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

3. You can gain power by making others feel important.

Answered: 1 week ago

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago