Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have created a timesheet that when a user completes any day and the total
hours for the day exceeds 8 hours they get the option of overtime or comptime. However, I need to also add a sum function that shows total hours over 40 that the user has not specified if the hours will be overtime or comptime. For example if Monday through Friday the user worked 9 hours, each day the person will identify the additional hour as overtime or comptime, but if they work 3 hours on Saturday I need to ask if these hours will be overtime or comptime. Below is what I have so far, but I can not figure out the rest. Private Sub Worksheet_Change(ByVal Target As Range) Dim pintAnswer As Integer Dim r As New Worksheet Set r = Sheet55 'This is for Week 1 Monday If r.Cells(13, 11) 8 And r.Cells(13, 12) = "" Then pintAnswer = MsgBox("Do you want to be paid Overtime for the additional hour(s) that you worked today?", vbYesNo + vbQuestion, "Monday Week 1 Overtime") If pintAnswer = vbYes Then r.Cells(13, 12) = "OT" Else pintAnswer2 = MsgBox("Do you want to earn Comp Time Hours for the additional hour(s) worked today?", vbYesNo + vbQuestion, "Monday Week 1 Comp Time") If pintAnswer2 = vbYes Then r.Cells(13, 12) = "Comp" End If End If End If Any suggestions would be great. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding, or automatically answering, a confirmation msgbox | Excel Discussion (Misc queries) | |||
msgbox | Excel Discussion (Misc queries) | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
MsgBox compile error in Excell | Excel Discussion (Misc queries) | |||
Msgbox | Excel Worksheet Functions |