Forum Discussion
LizM123
Aug 12, 2022Copper Contributor
Error after using VBA to clear dependent dropdowns
Hi, Hope this is ok to post here! I thought I had been really clever as I sussed how to get my drop-downs to clear if the "parent" drop-down had changed. But now I can't edit anything else on the...
HansVogelaar
Aug 12, 2022MVP
Like this (edited because of mistake)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Intersect(Me.Cells.SpecialCells(xlCellTypeAllValidation), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Column = 13 And Target.Validation.Type = xlValidateList Then
Target.Offset(0, 1).Resize(1, 2).Value = "Please Select"
End If
If Target.Column = 14 And Target.Validation.Type = xlValidateList Then
Target.Offset(0, 1).Value = "Please Select"
End If
Application.EnableEvents = True
End Sub
- LizM123Aug 16, 2022Copper Contributor
HansVogelaar ooo thank you! I will give it a go 🙂