Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Download below the macro - enabled Excel workbook file: Lastname.VBA.Conditionals.HW . xlsm . Save it using your last name. For example, Jones.VBA.Conditionals.HW . xlsm (

Download below the macro-enabled Excel workbook file: Lastname.VBA.Conditionals.HW.xlsm. Save it using your last name. For example, Jones.VBA.Conditionals.HW.xlsm (using your last name rather than Jones). Write your code in Module1.
Complete the two problems below on the same worksheet (both buttons should be on Sheet1), and then save and submit your workbook.
Assign your code to the appropriate button on Sheet1 for each macro. Each macro should also receive its inputs through an inputbox prompt and display its outputs through a msgbox.
Create a Sub called DonutDiscount that implements the flowchart below. Then, make it run by clicking a button.multiple of thirteen, then the program should output, "That number is NOT a lucky number!"
Hint: Use the Mod operator to determine if a number is a multiple of thirteen:
The Mod operator will return the remainder of one number divided by another, for instance
25 Mod 13=12(25/13=1 with a remainder of 12); 26 Mod 13=0(26/13=2 with a remainder of 0)
If the remainder =0, then the number is a multiple of 13. If the remainder is any other number, then the number is not a multiple of 13.
You can also apply the Mod operator on variables (i.e., myVariable Mod 13 would return the remainder of myVariable divided by 13).
Be sure to write your code in Module1 in the workbook.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

' How many different strategies did you find?

Answered: 1 week ago

Question

=+ 4. How can policymakers infl uence a nations saving rate?

Answered: 1 week ago