I am trying to write VBA code to match a value/barcode, enter a date/timestamp then move the cursor to the cell to the right of the timestamp. I have the match and time stamp working but cannot figure out how to have the cursor move to the cell to the right of the time stamp (so in a long list I would like to match a value in B, enter a time stamp in C and then move the cursor right to then allow me to enter a weight for the object with that specific barcode). Often I have long lists to match so once the barcode is matched, I would like the screen to scroll to where the timestamp is entered so I can enter the weight in the next cell in column D. Here is the code I have thus far:
Code:
Private Sub CommandButton1_Click()
Dim code As Variant
Dim matchedCell As Range
code = InputBox("Please scan a barcode and hit enter if you need to")
Set matchedCell = Range("B2:B1000").Find(what:=code, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=True)
If Not matchedCell Is Nothing Then matchedCell.Offset(0, 1).Value = Now
End Sub