Question: 1 . In the VBA Editor, insert a module ( NOT a class module ) . 2 . Insert a function; name the function Calculate

1. In the VBA Editor, insert a module (NOT a class module).2. Insert a function; name the function Calculate_Function 3. In the function signature - within the ()- declare two variables with the names value1 and value2(in this order) It is not necessary to declare a variable type. Simply list the variables within the () separated by a comma. For example ..... PUBLIC FUNCTION FUNCTION_NAME(VARIABLE1,VARIABLE2)4. Add your name as a subroutine comment. The comment should state, Author Name: your name. Replace your name with your actual first and last name. Recall comments start with the ' symbol. 5. The function return statement should calculate and return value1^value2 Recall that functions return values to the worksheet using a RETURN statement. The syntax for a return statement is: FUNCTION_NAME = value to be computed / returned NOTE: ensure you leave a space before and after the ^ character 6. Call the function from cell G4, and pass in as argument the values in cell G2(as value1) and G3(as value2)... This is Result17. Then, call the function from cell I3, but this time pass in the arguments in the reverse order (G3 as value1 and G2 as value2)... This is Result28. Change the value in cells G2 to 5 and the value in cell G3 to 4. Note how the values returned by the function (in cells G4 and I3) automatically update. 9. Copy your function code from the VBA editor and paste the code starting in cell K2.10. Below, copy (from the worksheet area starting in cell K2, and paste into column D, lines of code that match the description in column A.

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 Programming Questions!