I already have a code that enters data every time in a next row.
Now I would like to do the same with time but that it does not change at all. Basically I need a keyboard shortcut: ctrl+shift+:
Sub cardpackinsp()
Dim ws As Worksheet
Dim nextRow As Long
Set ws = Sheets("Data3")
nextRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row + 1
Range("'Data1'!$B6") = "=TODAY()"
ans = msgbox("Corrcet?", vbQuestion + vbYesNoCancel)
Select Case ans
Case vbYes
ws.Cells(nextRow, "C").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "C").Value = "Fail"
End Select
ans = msgbox("Correct QTY?", vbQuestion + vbYesNoCancel)
Select Case ans
Case vbYes
ws.Cells(nextRow, "D").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "D").Value = "Fail"
End Select
ans = msgbox("Position OK?", vbQuestion + vbYesNoCancel)
Select Case ans
Case vbYes
ws.Cells(nextRow, "E").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "E").Value = "Fail"
End Select
Now I would like to do the same with time but that it does not change at all. Basically I need a keyboard shortcut: ctrl+shift+:
Sub cardpackinsp()
Dim ws As Worksheet
Dim nextRow As Long
Set ws = Sheets("Data3")
nextRow = ws.Cells(ws.Rows.Count, "C").End(xlUp).Row + 1
Range("'Data1'!$B6") = "=TODAY()"
ans = msgbox("Corrcet?", vbQuestion + vbYesNoCancel)
Select Case ans
Case vbYes
ws.Cells(nextRow, "C").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "C").Value = "Fail"
End Select
ans = msgbox("Correct QTY?", vbQuestion + vbYesNoCancel)
Select Case ans
Case vbYes
ws.Cells(nextRow, "D").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "D").Value = "Fail"
End Select
ans = msgbox("Position OK?", vbQuestion + vbYesNoCancel)
Select Case ans
Case vbYes
ws.Cells(nextRow, "E").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "E").Value = "Fail"
End Select