I have a scanner that scans and tabs across to next column. Once it gets to a certain column (i.e. column D) I need it to return 1 row down, back to column B. I figured the best way to handle this would be the SelectionChange excel object in VB. However, I just attempted to just use the offset to make sure it would work correctly, and it does not. I just entered simple code of
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveCell.Offset(1,-1).Activate
End Sub
and it bombs out. I tried making them both positive number, and it will jump down a couple hundred rows and about 50 columns. Any pointers? I assumed this was the only coltrol to run my VB automatically without hitting a shortcut key, as they are scanning tons of information and that would be too repetitive. If you could also help with the if statement needed to identify active column ID that would help.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveCell.Offset(1,-1).Activate
End Sub
and it bombs out. I tried making them both positive number, and it will jump down a couple hundred rows and about 50 columns. Any pointers? I assumed this was the only coltrol to run my VB automatically without hitting a shortcut key, as they are scanning tons of information and that would be too repetitive. If you could also help with the if statement needed to identify active column ID that would help.