ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to auto tab (https://www.excelbanter.com/excel-worksheet-functions/181155-how-auto-tab.html)

Joel Ganger[_2_]

How to auto tab
 
I use a handheld scanner to read barcodes. How do I make excel automatically
tab to the next cell after input.

L. Howard Kittle

How to auto tab
 
Hi Joel,

Did a project using a scanner and I used an event macro, Worksheet Change
to make stuff happen when an item was entered with the scanner.

HTH
Regards,
Howard

"Joel Ganger" <Joel wrote in message
...
I use a handheld scanner to read barcodes. How do I make excel
automatically
tab to the next cell after input.




Joel Ganger

How to auto tab
 
Ok sounds simply enough, how do I do it?

"L. Howard Kittle" wrote:

Hi Joel,

Did a project using a scanner and I used an event macro, Worksheet Change
to make stuff happen when an item was entered with the scanner.

HTH
Regards,
Howard

"Joel Ganger" <Joel wrote in message
...
I use a handheld scanner to read barcodes. How do I make excel
automatically
tab to the next cell after input.





L. Howard Kittle

How to auto tab
 
Hi Joel,

Use something like this. If something is scanned into column A, then this
macro will fire and you will get the message. Or you can call a macro to do
what you want with the scanned entry which is what I did by calling
StudentID, (which I have edited out here).

So in my example once a student ID number is scanned into column 1 the
macro StudentID is called and the date and time and student information is
entered in that row. The StudentID macro draws it's info from a data base
on sheet 2 and commits it to sheet 1.

I am not an expert but if you need help getting it set up you could send me
a sample workbook and I will give it a go. Provide plenty of details of
what you want to happen and where, etc. dump the xxx

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Application.EnableEvents = False
'StudentID
MsgBox "I just scanned something"
Application.EnableEvents = True
End If
End Sub

Sub StudentID()
Dim FindVal As Variant
Dim fVal As Range

FindVal = Worksheets("Sheet1").Range("A65536").End(xlUp).Val ue
Set fVal = Worksheets("Sheet2").Columns("A").Find(FindVal)

If Not fVal Is Nothing Then
fVal.Offset(0, 1).Resize(1, 5).Copy _
Sheets("Sheet1").Range("D25000").End(xlUp).Offset( 1, 0)
ActiveCell.Offset(-1, 1) = Date
ActiveCell.Offset(-1, 2) = Time
End If
If ActiveCell.Offset(-1, 4).Value = "" Then
ActiveCell.Offset(-1, 3).Value = " No student data for this ID no."
ActiveCell.Offset(-1, 1) = ""
ActiveCell.Offset(-1, 2) = ""
End If
End Sub

HTH
Regards,
Howard

"Joel Ganger" <Joel
wrote in message
...
I use a handheld scanner to read barcodes. How do I make excel
automatically
tab to the next cell after input.




L. Howard Kittle

How to auto tab
 
Hi Joel,

Too much information in my reply, try one of these...
First Tabs rows and second Tabs Colums.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
ActiveCell.Offset(1, 0).Select
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
ActiveCell.Offset(0, 1).Select
End If
End Sub

HTH
Regards
Howard

"Joel Ganger" <Joel wrote in message
...
I use a handheld scanner to read barcodes. How do I make excel
automatically
tab to the next cell after input.





All times are GMT +1. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com