-
Sep 10th, 2014, 12:13 PM
#1
Thread Starter
New Member
Need help for barcode reader to have cursor jump to next row
Hi,
I have an Excel file programmed to work with a barcode scanner and I simply want help writing the code to have the cursor automatically jump from its current cell to the cell right below it after a barcode is scanned. All of the barcodes scanned are numbers that are 9 digits in length.
Thanks,
C. Prokop
-
Sep 10th, 2014, 12:51 PM
#2
Re: Need help for barcode reader to have cursor jump to next row
Well the first thing to do is have the barcode engine pass a character as a suffix when a barcode is scanned.
In this case I would think that having a CR sent after the scan should do the trick, most barcode readers support this.
In any case this should not need any code at all and is not VB6 related.
You should check your documentation on the scanner to see what you need to do to have it send a CR after each scan.
Often this just requires scanning a configuration barcode from the manual.
-
Sep 11th, 2014, 04:18 AM
#3
Re: Need help for barcode reader to have cursor jump to next row
I assume that the OP scans directly into a cell, so he can still do it manually if the scanner/barcode itself doesn't support CR
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Me.Cells(Target.Row + 1, Target.Column).Select
End Sub
EDIT: I forgot! Careful with this, since this works also for cells changed by typing something in it. If you only want to use this on the cells you get input from the scanner, you have to trap the cells by checking with an If- or Select-Case-clause if it's a cell for which you want to jump one cell below
Last edited by Zvoni; Sep 11th, 2014 at 08:57 AM.
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|