Tabbing out of Blank Cell

J

Jamie

I'm working in Excel 2002

I have a table with 18 columns where the user enters numeric values. The
sheet is proctected, the cells the user inputs information into are unlocked.
Currently I have the following coding:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 18 Then
Cells(Target.Row, 1).Select
End If
End Sub

What this does is if the user tabs out of column 18, row 3 for example, the
cursor goes to column A in the same row.

The above coding works only if there is a numeric value in the cell in
column 18. How can I get the above coding to work if the user leaves the
cell blank?

Thanks.
 
C

Chuck

Try using the SelectionChange event instead:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 

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