shiftygearbox
New Member
- Joined
- Nov 5, 2016
- Messages
- 1
Hello, I am trying to create a Sign In/ Out log for work. So far I have the first half complete, where i can able to record all pertinent data name, trailer number, route, date and time in, but this is a two step process. now I have to figure out how I am going to input the "time Out". What i was thinking i could do is use a combobox to display all the rows with no "Time Out" value, but i just do not know where to start. Below is the code for the sign in portion. Please help!
Private Sub cboRoute_DropButt*******()
'Populate Control.
Me.cboRoute.AddItem "Ryder"
Me.cboRoute.AddItem "Rocker"
Me.cboRoute.AddItem "TransNav"
Me.cboRoute.AddItem "Service"
Me.cboRoute.AddItem "Norplas"
Me.cboRoute.AddItem "Other"
End Sub
Private Sub cmdSaveEntry_Click()
'Copy input values to sheet.
MsgBox "Your Time In has been Recorded, please do not forget to sign out."
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("SignInSheet")
lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Cells(lRow, 1).Value = Me.txtFirst.Value
.Cells(lRow, 2).Value = Me.txtLast.Value
.Cells(lRow, 3).Value = Me.txtTrailerNumber.Value
.Cells(lRow, 4).Value = Me.cboRoute.Value
.Cells(lRow, 5).Value = Format(Now, "mm/dd/yy/ hh:mm")
End With
'Clear input controls.
Me.txtFirst.Value = ""
Me.txtLast.Value = ""
Me.txtTrailerNumber.Value = ""
Me.cboRoute.Value = ""
Unload signin
End Sub
Private Sub cboRoute_DropButt*******()
'Populate Control.
Me.cboRoute.AddItem "Ryder"
Me.cboRoute.AddItem "Rocker"
Me.cboRoute.AddItem "TransNav"
Me.cboRoute.AddItem "Service"
Me.cboRoute.AddItem "Norplas"
Me.cboRoute.AddItem "Other"
End Sub
Private Sub cmdSaveEntry_Click()
'Copy input values to sheet.
MsgBox "Your Time In has been Recorded, please do not forget to sign out."
Dim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("SignInSheet")
lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Cells(lRow, 1).Value = Me.txtFirst.Value
.Cells(lRow, 2).Value = Me.txtLast.Value
.Cells(lRow, 3).Value = Me.txtTrailerNumber.Value
.Cells(lRow, 4).Value = Me.cboRoute.Value
.Cells(lRow, 5).Value = Format(Now, "mm/dd/yy/ hh:mm")
End With
'Clear input controls.
Me.txtFirst.Value = ""
Me.txtLast.Value = ""
Me.txtTrailerNumber.Value = ""
Me.cboRoute.Value = ""
Unload signin
End Sub