Hi,
I'm trying to set up a variable data validation list based on the value of another cell - the code is set to run on worksheet change however when testing it I keep getting error 1004 - I do have named ranges set up - but can't work out what the issue is - can anyone suggest a solution? Code for the data validation is below (I've tried substituting the range name for cell reference but that still didn't work.
Appreciate any suggestions
I'm trying to set up a variable data validation list based on the value of another cell - the code is set to run on worksheet change however when testing it I keep getting error 1004 - I do have named ranges set up - but can't work out what the issue is - can anyone suggest a solution? Code for the data validation is below (I've tried substituting the range name for cell reference but that still didn't work.
Appreciate any suggestions
VBA Code:
With Range("O" & x).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="Major1"
.InCellDropdown = True
End With