I realize that this question has been asked and answered previously - however, for the life of me I cannot figure out why the below code isn't working in my case.
My parent drop down list exists in column D (various rows) and my dependent list exists in column F (again various rows corresponding to those in D).
I have tried the following code, however, changes in cells column D (4) do not result in the contents of the corresponding cells in column F (6) being cleared. I have tried saving the excel workbook as binary and macro-enabled to no avail (if it even makes a difference).. what could I be doing wrong? Thanks.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Column = 4 Then
If Target.Validation.Type = 3 Then
Application.EnableEvents = False
Target.Offset(0, 2).ClearContents
End If
End If
exitHandler:
Application.EnableEvents = True
Exit Sub
End Sub
My parent drop down list exists in column D (various rows) and my dependent list exists in column F (again various rows corresponding to those in D).
I have tried the following code, however, changes in cells column D (4) do not result in the contents of the corresponding cells in column F (6) being cleared. I have tried saving the excel workbook as binary and macro-enabled to no avail (if it even makes a difference).. what could I be doing wrong? Thanks.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Column = 4 Then
If Target.Validation.Type = 3 Then
Application.EnableEvents = False
Target.Offset(0, 2).ClearContents
End If
End If
exitHandler:
Application.EnableEvents = True
Exit Sub
End Sub