Case 12

# Case 12 - End If End Sub Calculate Pay Dim Hours Rate Pay...

This preview shows pages 1–2. Sign up to view the full content.

NameAndDate Sheets("Documentation").Select Range("B4").Select Selection.ClearContents ActiveCell.FormulaR1C1 = InputBox("Enter your name", "Your Name") Range("B5").Select ActiveCell.FormulaR1C1 = InputBox("Enter current date", "Current Date") NewOrder Sub NewOrderMacro() If (Range("C6").Value = "") Or (Range("C9").Value = "") Then MsgBox "Please enter data for Product ID and Units Sold", vbCritical, "Data Missing" Else Call CopyNewOrderToOrderSummaryWorksheet

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: End If End Sub Calculate Pay Dim Hours, Rate, Pay Hours = Range("C6").Value Rate = Range("C7").Value If Hours < 0 Then MsgBox "The value for Hours Worked cannot be a negative number." ElseIf Hours <= 40 Then Pay = Hours * Rate MsgBox "The pay amount due is " & Pay Else Pay = (40 * Rate) + (Hours - 40) * Rate * 1.5 MsgBox "The pay amount due is " & Pay End If...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern