Good afternoon all,
I have working on different ways to lock cells without protecting the worksheet. I have found the following code to perform someway to what I am looking for:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 6 Then
If Target.Row = 3 Or Target.Row = 5 Then
Beep
Cells(Target.Row, Target.Column).Offset(0, 1).Select
End If
End If
End Sub
Unfortunately my VBA knowledge is extremely limited and do not know how to extend the code from applying to a single cell to a range of cells.
Is there anyone who can help.
thanks
Rab
I have working on different ways to lock cells without protecting the worksheet. I have found the following code to perform someway to what I am looking for:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 6 Then
If Target.Row = 3 Or Target.Row = 5 Then
Beep
Cells(Target.Row, Target.Column).Offset(0, 1).Select
End If
End If
End Sub
Unfortunately my VBA knowledge is extremely limited and do not know how to extend the code from applying to a single cell to a range of cells.
Is there anyone who can help.
thanks
Rab