Question: Write a sub that asks the user for an integer such as 4 0 and stores it in the variable intUpperLimit. It then asks the

Write a sub that asks the user for an integer such as 40 and stores it in the variable
intUpperLimit. It then asks the user for another integer such as 10 and stores it in the variable
intFactor. It then creates an array called multiple, of the appropriate size, that contains all the
multiples of intFactor no greater than intUpperLimit. Finally, it uses a loop to sum all of the
elements in the array and reports this sum with an appropriate message in a MsgBox. For
example, if the two inputs are 40 and 10, it should report The sum of all multiples of 10 no
greater than the upper limit of 40 is 100.
List the intUpperLimit and intFactor values in cells A2 and B2, and multiples in column C.
Put a control button in worksheet Problem 2 to run the sub. Remember to clean up cells
between runs.

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!