CCD Bardcode Scanner

J

James E Middleton

I have made barcodes the contain student ID information. When entering
grades, I scan the barcode, the student information is entered
automatically, ant then I enter a grade manually.



However, when scanning into Excel, the cursor automatically goes to the next
cell in the column. (Scan into 'A1' cursor moves to 'A2'.) I'd like it to
move to the next column. (Scan into 'A1' cursor moves to 'B1'.)



Is there a way to change this so it goes to the next column instead?
 
L

L. Howard Kittle

Hi James,

Perhaps an change event macro with:

activecell.offset(0,1).select

HTH
Regards,
Howard
 
J

James E Middleton

Thanks Howard,

Don't know if I set it up correctly or not, as this was my forst Macro. But,
as is, the cursor still moves down the column instead of to the next column.

_______

Sub Scan_Next_Column()
'
' Scan_Next_Column Macro
' Macro recorded 11/11/2005 by JEM
'
ActiveCell.Offset(0, 1).Select
'
End Sub

_________
 
J

James E Middleton

Perfect!

I scan the first student's barcode, the cursor moves to the right, and I can
enter the data.

I'm half way there.

Next dilemma....

When I scan and data is entered into 'A1', the cursor moves to 'B1' like I
want, so I can enter a score and hit enter, but the cursor moves to 'C1'.

What I'd like to happen is after entering the score in 'B1', when I press
enter, have the cursor to move to 'A2', scan, and have the cursor move to
'B2'?

That is, is there a way to lock the columns of the sheet so there are only
two columns so as I enter data, the cursor moves like this: 'A1', 'B1',
'A2', 'B2', 'A3', 'B3'.

Thanks!
 
R

Robert_Steel

James
if the setting change worked to a point
then one way to constrain the movement of the selected cell is to select a
range

so select A1:B50 then it should work for 50 grades

this would save any programming

hth RES
 
D

Dave Peterson

Just a request...

When you post in HTML, you're using very small fonts.

Since this is a text only newsgroup, could you switch to plain text?

It'll make it much easier for most (well, at least me) to read your posts.

Thanks.
 
J

James E Middleton

Thanks Robert,

I've used that before and in a perfect world that works, but when you make a
mistake during input, you have to reselect the cells and start again. Max
came up with a good solution, now I wonder if there's a way to save it or
run a macro....
 
J

James E Middleton

Max,

That works great. Is there a way to save that and run it as a macro or
something?
 
M

Max

James E Middleton said:
That works great.

Glad to hear that !
.. Is there a way to save that and run it as a macro or something?

Try the sub below, which is to be placed in the "ThisWorkbook" module

Right-click on the Excel icon just to the left
of "File" on the menu > Choose "View Code"
(This will bring you direct into the "ThisWorkbook" module)

Copy > Paste the sub into the code window on the right
(clear the defaults there first)


Private Sub Workbook_Open()
Worksheets("Sheet1").ScrollArea = "A1:B100"
End Sub
 
M

Max

And if we want the "move right after Enter" setting applied as well, try:

Private Sub Workbook_Open()
Worksheets("Sheet1").ScrollArea = "A1:B100"
Application.MoveAfterReturnDirection = xlToRight
End Sub
 
R

Robert_Steel

Dave
Thanks for pointing this out.
I am accessing through a Lotus Notes interface so not obvious to me.
Hoping I have changed the correct preference. But not to say our ever
helpfull system admin won't reset it.

Cheers RES
 
D

Dave Peterson

Thanks!

(This one came through loud and clear.)

Dave
Thanks for pointing this out.
I am accessing through a Lotus Notes interface so not obvious to me.
Hoping I have changed the correct preference. But not to say our ever
helpfull system admin won't reset it.

Cheers RES
 
Top