Question: Create the following macro: Value: 6 Your Output Create a subroutine (procedure) named 'Range_Fill' The subroutine should first declare two variables, each of type integer.

 Create the following macro: Value: 6 Your Output Create a subroutine

Create the following macro: Value: 6 Your Output Create a subroutine (procedure) named 'Range_Fill' The subroutine should first declare two variables, each of type integer. The first variable should store the worksheet value in cell G2. The second variable should be used as a loop counter. The subroutine should loop the number of times indicated in cell G2 and during each iteration should assign the loop counter value to the next cell in column J, starting with cell J3. Initialize your loop counter variable to 1 (from 1 to ....). For example, if cell G2 contains the value 6, then J3 = 1, J4 = 2, J5 = 3, J6 = 4, J7 = 5, and J8 = 6. If cell G2 contains the value 3, then then J3 = 1, J4 = 2, and J5 = 3 Add a control form button to this worksheet (G5:H6), change the button text to 'Fill the Range' and assign the Range_Fill macro to the button. ** Ensure you save your Excel file as macro-enabled Create the following macro: Value: 6 Your Output Create a subroutine (procedure) named 'Range_Fill' The subroutine should first declare two variables, each of type integer. The first variable should store the worksheet value in cell G2. The second variable should be used as a loop counter. The subroutine should loop the number of times indicated in cell G2 and during each iteration should assign the loop counter value to the next cell in column J, starting with cell J3. Initialize your loop counter variable to 1 (from 1 to ....). For example, if cell G2 contains the value 6, then J3 = 1, J4 = 2, J5 = 3, J6 = 4, J7 = 5, and J8 = 6. If cell G2 contains the value 3, then then J3 = 1, J4 = 2, and J5 = 3 Add a control form button to this worksheet (G5:H6), change the button text to 'Fill the Range' and assign the Range_Fill macro to the button. ** Ensure you save your Excel file as macro-enabled

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