I get this error while trying to run the code below. It stops right after the .Delete line i.e. on the .Add line. Funny is, after the delete the rng is still responding TRUE on rng.Validation.Value. I thought the value should be FALSE after a deletion?
(rng is a valid range validated in the immediate window where I can see its correct address etc. and the rList is also OK holding the address of the validation list, finally No the sheet is NOT protected)
With rng
With .Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=" & rList
End With
End With
(rng is a valid range validated in the immediate window where I can see its correct address etc. and the rList is also OK holding the address of the validation list, finally No the sheet is NOT protected)
With rng
With .Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=" & rList
End With
End With
Last edited: