Excel Excel 2007 How to automatically run a macro

Joined
Oct 29, 2012
Messages
3
Reaction score
0
I have created a roster that I want to barcode scan into. I want to run "text to columns" automatically when data is scanned into a1, then tab to a2, scan data, have "text to columns" auto run again. I know I can use the shortcut key but I would rather not. I want the user to simply scan into a1, a2, a3 and so on.
 
Joined
Nov 19, 2006
Messages
23
Reaction score
0
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 1 Then Exit Sub
    If Target.Count > 1 Then Exit Sub

    'Your code goes here.

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top