Hi,
I have some data validation in column AD which the user selects an item form a drop down list, I also have a worksheet change event which checks the formula result in column AG, this all works fine when the user selects the item from the drop down list however if the user types the item in the cell the worksheet change does not work. Is there a way around this?
Regards
I have some data validation in column AD which the user selects an item form a drop down list, I also have a worksheet change event which checks the formula result in column AG, this all works fine when the user selects the item from the drop down list however if the user types the item in the cell the worksheet change does not work. Is there a way around this?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("AD:AD")) Is Nothing Then
Exit Sub
Else
Dim x As Long
Dim c As Range
x = ActiveCell.Row
Set c = Range("AD" & x).Offset(0, 3)
If c.Text = "Error" Then
MsgBox Chr(10) & Chr(10) & ("Tank Selection Error ") & Chr(10) & Chr(10) & "Please Check Selection" & Chr(10) & Chr(10), vbCritical, "Selection Error"
With Application
.Undo
End With
Exit Sub
Else
End If
End If
Regards