This preview has intentionally blurred sections. Sign up to view the full version.View Full 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
- Spring '08
- Negative and non-negative numbers, NewOrder Sub NewOrderMacro, Enter current date, Rate MsgBox, Pay Dim