Eliminating unwanted columns and eEntering data using Barcode Scan

  • Thread starter Thread starter edmg1man
  • Start date Start date
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
 
--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
 
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
 
Back
Top