Create a new macro-enabled workbook saved [FirstName]_[LastName].xlsm (without the "[]" symbols)

Discipline: Computer science

Type of Paper: Question-Answer

Academic Level: Undergrad. (yrs 3-4)

Paper Format: APA

Pages: 1 Words: 275

Question

Create a new macro-enabled workbook saved [FirstName]_[LastName].xlsm (without the "[]" symbols)

Complete the following two problems below on the same worksheet and then save and submit your workbook

For each macro, assign it to a button. Each macro should also receive its inputs through an input box and display its outputs through a msgbox.

Create a Sub called "GoodJudgement" that implements the flowchart below and make it run by clicking a button




Start
NOC
Key:
NOC
Z
NOC - Number of Cookies
NOC - Number of cookies
true
false
Display
If you eat these, you
will be sick



Expert Solution Answer



Code

Sub GoodJudgement()
Dim noc As Integer
noc = InputBox("Enter number of Cookies:")
If noc > 12 Then
MsgBox "If you are eat these, you will be sick"
Else
MsgBox "Your body can handle this"
End If

End Sub

How to add button and assign macro to it

step by step

simplelfElse - Excel (Product Activation Failed)\n0\n0\n-\nSign in\nX\nShare\nReview\nView Developer\nProperties S\nY\na View Code\nASSE\nASSE\nsimplelfElse - Excel (Product Activation Failed)\nDrawing Tools\n0\n0\n-\nSign in\nX\nShare\nFile Home Insert Page Layout FormulSign in\nShare\nsos\nsimplelfElse - Excel (Product Activation Failed)\nDrawing Tools\nHome Insert Page Layout Formulas Data Review

output

ASSE\nsimplelfElse - Excel (Product Activation Failed)\nReview\nSign in\nShare\nView Developer\nProperties\nFile Home Insert Page LaASSE\nSign in\nShare\nFile Home Insert Page Layout Formulas Data\nRecord Macro\nUse Relative References\nVisual Macros\nAdd- Excel CASSE\nsimplelfElse - Excel (Product Activation Failed)\nReview\nSign in\nShare\nView Developer\nProperties\nFile Home Insert Page LaASSE\nSign in\nShare\nFile Home Insert Page Layout Formulas Data\nRecord Macro\nUse Relative References\nVisual Macros\nAdd- Excel C

If you have any query regarding the code please ask me in the comment i am here for help you. Please do not direct thumbs down just ask if you have any query. And if you like my work then please appreciates with up vote. Thank You.