Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default MsgBox

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding, or automatically answering, a confirmation msgbox Brian Beck Excel Discussion (Misc queries) 1 July 28th 06 04:11 PM
msgbox James Coughlan Excel Discussion (Misc queries) 3 May 3rd 06 01:57 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
MsgBox compile error in Excell Jerry Dyben Excel Discussion (Misc queries) 1 October 11th 05 07:04 PM
Msgbox Wildman Excel Worksheet Functions 1 April 26th 05 04:57 AM


All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"