Question: 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)

 vba Excel Q2. (15 points) In Module Q2, write a sub

procedure called Project that calculates total revenue of a product under various

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

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!