Move to a set cell if
Try it like this:
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H7:H27"
Dim TRow As Integer
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
TRow = Target.Row
With Target
If LCase(Cells(TRow, 6).Value) = "no" Or _
LCase(Cells(TRow, 7).Value) = "no" Or _
LCase(Cells(TRow, 8).Value) = "no" Then
Cells(TRow, 10).Activate
Else
Cells(TRow + 1, 6).Activate
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
Hope this helps
Rowan
RJG wrote:
Bob,
I realise this must be starting to turn into a bad dream, I have
tried your suggestion but it returns the curser to the same point. (J7)
but in reality I would like it to go to the row in question (J7:J27). I
have tried "playing" with the code without success. Is there an easy
fix.??
|