I am trying to set the data validation for a range of cells using VBA. I get a run-time error 1004 (so helpful) \"Application defined or object defined error\" with this cod
This is a pretty old post but for anyone getting here with the the same issue I did, here is how the problem was solved in my case:
I just replaced the
With Range(Cell1,Cell2).Validation
part by
Range(Cell1,Cell2).Select With Selection.Validation
And tadaaa! it works :)