Hi All you Guru's,
I need a little help.
I have 5 Dependent drop down Lists. Created from the Data Validation. I would like to reset the selections once the user decides to do another selection. I created this code below. The idea is the if the user makes the 5 selections and if he chooses to start over he can go to the top Dropdown select another option and it would reset the other drop downs to the first positions. If the 1st drop down is doesn't change and user selects to change the 2nd drop down the other 3 drop down fields reset to 1st position so on and so forth. It works an it doesn't Please help.
I need a little help.
I have 5 Dependent drop down Lists. Created from the Data Validation. I would like to reset the selections once the user decides to do another selection. I created this code below. The idea is the if the user makes the 5 selections and if he chooses to start over he can go to the top Dropdown select another option and it would reset the other drop downs to the first positions. If the 1st drop down is doesn't change and user selects to change the 2nd drop down the other 3 drop down fields reset to 1st position so on and so forth. It works an it doesn't Please help.
Code:
Private Sub Worksheet_Change_DD1(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$1" And Target.Validation.Type = 3 Then
Target.Offset(1, 0).Value = "SPORT"
Target.Offset(2, 0).Value = "ALL"
Target.Offset(3, 0).Value = "ALL"
Target.Offset(4, 0).Value = "ALL"
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change_DD2(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$2" And Target.Validation.Type = 3 Then
Target.Offset(1, 0).Value = "ALL"
Target.Offset(2, 0).Value = "ALL"
Target.Offset(3, 0).Value = "ALL"
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change_DD3(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$3" And Target.Validation.Type = 3 Then
Target.Offset(1, 0).Value = "ALL"
Target.Offset(2, 0).Value = "ALL"
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change_DD4(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$A$4" And Target.Validation.Type = 3 Then
Target.Offset(1, 0).Value = "ALL"
End If
Application.EnableEvents = True
End Sub
Last edited by a moderator: