Excel Timesheet

trigirl

Board Regular
Joined
Sep 13, 2007
Messages
87
I have an Excel timesheet, and I am wondering if there is a way to have the timesheet default to PM after 12 noon, so the employees dont have to put in PM, they would just put their time and the sheet would default it to PM.
 
Sub Button3_Click()
ActiveSheet.Unprotect (rw4455)
InpBx1 = InputBox("Enter the hour you want.")
InpBx2 = InputBox("enter the minutes you want.")
InPBx3 = InputBox("Enter AM or PM ")
Application.ActiveCell.Value = InpBx1 & ":" & InpBx2 & ":" & "00 " & InPBx3
ActiveSheet.Protect (rw4455)
End Sub

What could I add to this to have it just show a info box asking them to double check their time? As maybe InfoBX.....
 
Upvote 0
try this:
Code:
ActiveSheet.Unprotect (rw4455)
        InpBx1 = InputBox("Enter the hour you want.")
        InpBx2 = InputBox("enter the minutes you want.")
        InPBx3 = InputBox("Enter AM or PM ")
        TimeClk = InpBx1 & ":" & InpBx2 & ":" & "00 " & InPBx3
        Rspnse = MsgBox("Your Time entered is " & Chr(13) & TimeClk & Chr(13) & " Is this Correct?", vbYesNo)
            If Rspbse = vbNo Then
                Exit Sub
            ElseIf Rspnse = vbYes Then
        Application.ActiveCell.Value = TimeClk
    ActiveSheet.Protect (rw4455)
            End If

Michael
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top