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 and stores it in the variable
intUpperLimit. It then asks the user for another integer such as 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 and it should report The sum of all multiples of no
greater than the upper limit of is
List the intUpperLimit and intFactor values in cells A and B and multiples in column C
Put a control button in worksheet Problem 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
