I have this code on a sheet in my sprdsht. As you can see, when the cursor hits column 18 it jumps back to column 5. Oh, I should tell you that I don't know what the hell I'm looking at. This was given to me by David.
Public sColumn As String
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
sColumn = ActiveCell.Column
If sColumn = 18 Then
ActiveCell.Offset(1, -13).Range("A1").Select
End If
End Sub
Anyway. My sheet consists of 18 columns by 42 rows. I would like to add something that prevents the user from accessing any other cell on the sheet. ie If they try, or by accident, click in column 19 or row 43 etc, the cursor will jump back somewhere into the sheet cell dimensions.
thanks again & again
Cliff
Public sColumn As String
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
sColumn = ActiveCell.Column
If sColumn = 18 Then
ActiveCell.Offset(1, -13).Range("A1").Select
End If
End Sub
Anyway. My sheet consists of 18 columns by 42 rows. I would like to add something that prevents the user from accessing any other cell on the sheet. ie If they try, or by accident, click in column 19 or row 43 etc, the cursor will jump back somewhere into the sheet cell dimensions.
thanks again & again
Cliff