This is first time I've used VB since college many years ago.
I'm trying to create a spreadsheet for loging asset use at work.
See below for example
<TBODY>
</TBODY>
I've currently got the sheet set up so when data is input to SCANNER ID a timestamp appears in TIME OUT this works great.
I want to use the same change event idea, so I can book the scanners back in.
The code I have is as follows,
Any help would be great!!!
Chris
I'm trying to create a spreadsheet for loging asset use at work.
See below for example
NAME | SCANNER ID | TIME OUT | SCANNER ID | TIME IN |
<TBODY>
</TBODY>
I've currently got the sheet set up so when data is input to SCANNER ID a timestamp appears in TIME OUT this works great.
I want to use the same change event idea, so I can book the scanners back in.
The code I have is as follows,
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
For Each Cell In Target
With Cell
If .Column = Range("B:B").Column Then
Cells(.Row, "C").Value = DateValue(Date) & " " & TimeValue(Now())
End If
End With
Next Cell
End Sub
I thought I could just copy this and insert it again with Range / Row Changed, but excel keeps telling me off.Dim Cell As Range
For Each Cell In Target
With Cell
If .Column = Range("B:B").Column Then
Cells(.Row, "C").Value = DateValue(Date) & " " & TimeValue(Now())
End If
End With
Next Cell
End Sub
Any help would be great!!!
Chris