Did you update EVERY single reference to row 5 in your code with my range references?
Please post your complete updated code.
If you did that, and it is still not working properly, please show us the structure of your "Data2" sheet.
If you have any sensitive data in it, just replace it with "dummy" data.
Sub MSGBOXWEE()
Dim ws As Worksheet
Dim nextRow As Long
Set ws = Sheets("Data2")
nextRow = Cells(ws.Rows.Count, "C").End(xlUp).Row + 1
If nextRow < 5 Then nextRow = 5
ws.Cells(nextRow, "C") = "=NOW()"
a = InputBox("Box")
ws.Cells(nextRow, "E") = a
Ans = msgbox("Label OK?", vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
ws.Cells(nextRow, "F").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "F").Value = "Fail"
End Select
Ans = msgbox("Undamagaed?", vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
ws.Cells(nextRow, "G").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "G").Value = "Fail"
End Select
Ans = msgbox("CP?", vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
ws.Cells(nextRow, "H").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "H").Value = "Fail"
End Select
Ans = msgbox("Full?", vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
ws.Cells(nextRow, "I").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "I").Value = "Fail"
End Select
Ans = msgbox("Undamaged?", vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
ws.Cells(nextRow, "J").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "J").Value = "Fail"
End Select
Ans = msgbox("Quantity OK?", vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
ws.Cells(nextRow, "K").Value = "Pass"
Case vbNo
ws.Cells(nextRow, "K").Value = "Fail"
End Select
b = InputBox("Type of Quality test")
ws.Cells(nextRow, "L") = b
c = InputBox("Remarks")
ws.Cells(nextRow, "M") = c
D = InputBox("Name")
ws.Cells(nextRow, "O") = D
End Sub