View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.setup
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Barcode scanner and quantities


OK, so here's what I'm looking at. I right-click on the correct worksheet
tab at the bottom, and then View Code? YES!



Then do I just paste that code in
there? YES!


Does it matter if I'm in General or Worksheet? NO!

I tried it both
ways....but all I'm getting is what it did before....that my scanner inputs
the barcode info in whatever cell is highlighted.

Just to be sure I'm clear....what I want to do is scan, and then have Excel
say "OK, that barcode info matches the info that's in cell C17, so select D17
so the user can input the quantity".


Scanner shall input the barcode info in whatever cell is highlighted, so you
have to position to the first free cell in column C manually before starting
scanning. Then this event sub selects the adjacent cell in column D waiting
for inputting the quantity, then selects cell in the next row in column C
waiting for scanning the next barcode.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then Range("D" & Target.Row).Select
If Target.Column = 4 Then Range("C" & Target.Row + 1).Select
End Sub


Regards.
Stefi