Hello. i got a question about barcode scanner.. when i scan a number with the barcode scanner my macro`s arent working..? but the formula`s are working.. i cannot link the sheet i`m working on since its a invalid file.. but i will link the macro i am using, and link a picture of what`s not happening.. The red colour is when i scan with the barcode scanner.. the others is when i manually write the numbers.. the job of the marco is to post the date today (B), and copy the number from F to G
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
'disable events to stop changes made by this macro re-trigering it
Application.EnableEvents = False
'test if changed cell is a number
If IsNumeric(Target.Value) Then
Target.Offset(, 6).Value = Target.Offset(, 5).Value
'only add a date if no date in column I
If Not IsDate(Range("B" & Target.Row).Value) Then
Range("b" & Target.Row).Value = Format(Date, "YYYYDDMM")
End If
End If
're-enable events
Application.EnableEvents = True
End If
Exit Sub
'error handler
ErrHnd:
Err.Clear
're-enable events
Application.EnableEvents = True
End Sub
Attachments
Last edited by a moderator: