Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

vba Excel Q2. (15 points) In Module Q2, write a sub procedure called Project that calculates total revenue of a product under various scenarios. (1)

image text in transcribed

image text in transcribed

vba Excel

Q2. (15 points) In Module Q2, write a sub procedure called Project that calculates total revenue of a product under various scenarios. (1) Variable Scenario, defined as String type. It represents the state of the market. Variable Price is the price of the product. Variable Unit is the number of products sold. Variable Revenue = Price * Unit is the total revenue of the firm's project. Variables Price, Unit and Revenue have Variant data type. Price and Unit under each scenario of the market is given worksheet "Q1". Use an input box as below to assign value to Scenario The sub is terminated immediately, if the user clicks Cancel or Exit (X) button. Scenario variable only accepts three values: Normal, Best, and Worst. If the user enters wrong value of Scenario, the calculation is cancelled and a dialog box as below Microsoft Excel Your input is wrong! should be displayed. You should use statement Exit Sub to terminate the sub procedure. Note that the input value is case sensitive, e.g., "normal" and "NORMAL" are both invalid inputs. If the user enters an acceptable value of Scenario, use a message box as below to display the calculated Revenue. Note that in the message box, "Best" is the value of Scenario and "550" is the result of Revenue. Microsoft Excel Under Best state of the market, the total revenue of the project is $550

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

More Books

Students also viewed these Databases questions