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
This note was uploaded on 09/27/2009 for the course BITM 110 taught by Professor Liugang during the Spring '08 term at SUNY Albany.
- Spring '08