Question: VBA PROGRAM: 4. Write a sub that asks the user for an integer such as 100 and stores it in the variable upperLimit. It then

VBA PROGRAM:

4. Write a sub that asks the user for an integer such as 100 and stores it in the variable upperLimit. It then asks the user for another integer such as 3 and stores it in the variable factor. It then creates an array called multiple, of the appropriate size, that contains all the multiples of factor no greater than upperLimit. 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 100 and 3, it should report The sum of all multiples of 3 no greater than 100 is 1683.

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