G
Gareth
Can anyone help?
I have the following code which works fine on 2000 but in work we have '97
and the sheet event doesn't fire when selecting items from a drop down
valuidation list in column F.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo ws_exit
If Target.Column = 6 Then
If Target.Offset(0, -5).Value <= Worksheets("Sheet2").Range("A1").Value
Then
If Right(Target.Value, 1) = "^" Then
MsgBox "Error, you must choose one without a roof on!"
End If
ElseIf Target.Offset(0, -5).Value >
Worksheets("Sheet2").Range("A1").Value Then
If Right(Target.Value, 1) <> "^" Then
MsgBox "Error, you must choose one with a roof on!"
End If
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub
This check is very important, is there any other way to do it?
Thanks in advance.
Gareth
I have the following code which works fine on 2000 but in work we have '97
and the sheet event doesn't fire when selecting items from a drop down
valuidation list in column F.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo ws_exit
If Target.Column = 6 Then
If Target.Offset(0, -5).Value <= Worksheets("Sheet2").Range("A1").Value
Then
If Right(Target.Value, 1) = "^" Then
MsgBox "Error, you must choose one without a roof on!"
End If
ElseIf Target.Offset(0, -5).Value >
Worksheets("Sheet2").Range("A1").Value Then
If Right(Target.Value, 1) <> "^" Then
MsgBox "Error, you must choose one with a roof on!"
End If
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub
This check is very important, is there any other way to do it?
Thanks in advance.
Gareth