Eliminating unwanted columns and eEntering data using Barcode Scan

E

edmg1man

This is a two part question. First is how do I eliminate all the excess
columns to the right of my worksheet? I have done it once before but can't
remember how. I only have four columns across the width of the page and I
don't want to see all the unwanted cells. I think this would help during
data entry to enable an automatic return to the first cell in the next row
which... is my second question. The scanner is set up to enter data and tab
to the next cell automatically. I am trying to eliminate all key strokes so
I only need to do use the scanner.
Suggestions?
Using Excel 2007
 
J

Jacob Skaria

--Select all columns to the right from ColE. Select ColE hit Ctrl+Shift+Right
arrow to select. From menu Format>Column>Hide

--Select the sheet tab which you want to work with. Right click the sheet
tab and click on 'View Code'. This will launch VBE. Paste the below code to
the right blank portion. Get back to to workbook and try out.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
Range("A" & Target.Row + 1).Activate
Else
Target.Offset(, 1).Activate
End If
End Sub

If this post helps click Yes
 
E

edmg1man

Thanks for the info. The Hide columns part worked fine but I had no success
with the View code but it does give me some idea of where to start searching
and playing around with some other form of code. Thanks again
 

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