Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Visual basic for applications In this homework assignment, you will develop macros using InputBox and MsgBox. Requirements: 1. Set up filename. (1pt) A. Enable macros
Visual basic for applications
In this homework assignment, you will develop macros using InputBox and MsgBox. Requirements: 1. Set up filename. (1pt) A. Enable macros on your Excel. B. Save HW3 YourLastName Your FirstName.xlsm as HW3_YourLastName_YourFirstName.xlsm. 2. Set up module to implement macros. (1pt) A. Go to VB Editor. B. insert a new standard module and rename it as ModuleHW3. C. insert Option Explicit onto the first line in the module. 3. Implement Input button click event handler. (23pts) A. Name Range("B2:B6") as input to record user input data. B. Set the center horizontal alignment on range Input. C. Use InputBox with title Terps Dairy and relevant default text to record user's name onto Cells(1) of range Input. D. Use InputBox with title Terps Dairy and relevant default text to record user's email address onto Cells(2) of range Input. E. Use InputBox with title Terps Dairy and relevant default text to record user's chocolate ice cream quantity onto Cells(3) of range Input. F. Use InputBox with title Terps Dairy and relevant default text to record user's vanilla ice cream quantity onto Cells(4) of range Input. G. Use InputBox with title Terps Dairy and relevant default text to record user's strewberry ice cream quantity onto Cells(5) of range Input. 4. Implement Order button click event handler. (23pts) A. Declare unitPrice as a constant with value 2.5 or 2.50. B. Declare taxRate as a constant with value 0.06. C. Declare all necessary variables. D. Sum up the total quantity of three flavors of ice cream and store into an Integer variable. E. Calculate the total after-tax price and store into a single variable. F. Use a MsgBox to display: unit price, total quantity, tax rate, and final total price, by showing OK and Cancel buttons and the Information icon. 5. Implement Clear button click event handler. (4pts) A. Clear contents in range Input, but keep the format. 6. Write at least eight comments to explain your code. (8pts) In this homework assignment, you will develop macros using InputBox and MsgBox. Requirements: 1. Set up filename. (1pt) A. Enable macros on your Excel. B. Save HW3 YourLastName Your FirstName.xlsm as HW3_YourLastName_YourFirstName.xlsm. 2. Set up module to implement macros. (1pt) A. Go to VB Editor. B. insert a new standard module and rename it as ModuleHW3. C. insert Option Explicit onto the first line in the module. 3. Implement Input button click event handler. (23pts) A. Name Range("B2:B6") as input to record user input data. B. Set the center horizontal alignment on range Input. C. Use InputBox with title Terps Dairy and relevant default text to record user's name onto Cells(1) of range Input. D. Use InputBox with title Terps Dairy and relevant default text to record user's email address onto Cells(2) of range Input. E. Use InputBox with title Terps Dairy and relevant default text to record user's chocolate ice cream quantity onto Cells(3) of range Input. F. Use InputBox with title Terps Dairy and relevant default text to record user's vanilla ice cream quantity onto Cells(4) of range Input. G. Use InputBox with title Terps Dairy and relevant default text to record user's strewberry ice cream quantity onto Cells(5) of range Input. 4. Implement Order button click event handler. (23pts) A. Declare unitPrice as a constant with value 2.5 or 2.50. B. Declare taxRate as a constant with value 0.06. C. Declare all necessary variables. D. Sum up the total quantity of three flavors of ice cream and store into an Integer variable. E. Calculate the total after-tax price and store into a single variable. F. Use a MsgBox to display: unit price, total quantity, tax rate, and final total price, by showing OK and Cancel buttons and the Information icon. 5. Implement Clear button click event handler. (4pts) A. Clear contents in range Input, but keep the format. 6. Write at least eight comments to explain your code. (8pts)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started