Question
In VBA Excel '2. (25 Points - 15 min) Using the Developer Tab, place a button on the worksheet named Problem2, ' in VBE place
In VBA Excel
'2. (25 Points - 15 min) Using the Developer Tab, place a button on the worksheet named Problem2, ' in VBE place your code sub named Problem2 in modeule Prob2. ' When the button is clicked, the VBA sub you created should run the code that will do the following. ' (Note, if you do not know how to code some of the steps, write the code for whatever steps ' you do know so that you can get credit for the parts of the code you can write.) ' Write your full name as a comment in the first line of the Module after the "Option Explicit." ' ' a. Define a RANGE VARIABLE and assign to this variable cells E2 to E11 in worksheet Problem1. ' b. Using VBA define a RANGE NAME (call it fraction) that refers to cells A11 to A20 in worksheet ' Problem3. ' c. Using the range variable and the range name defined above, use the worksheet function ' Sumproduct to calculate the sum of the product of cells E2 to E11 in worksheet Problem1 ' and the cells A11 to A20 in worksheet Problem 3 and assign the value to a double variable. ' d. Read from cell A1 in worksheet Problem 2, the cell where the result will be placed; ' e.g., cell A1 will have something like D7 ' e. Place in the cell read in part d (e.g., D7) the value calculated in part c. ' f. Using VBA code and the format property change the format of the cell where the result was ' written so that it is displayed as a number with exactly three digits to the right of the ' decimal point and at least four digit to the left of the decimal point. That is, 0.3013 ' should be displayed as 0,000.301.
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