I am getting a runtime error 1004 on the following line of code. I am attempting to add a date validation to Cell B4 to only allow dates after 1/1/1000.
Code
With Range("B4").Validation
.Delete
.Add Type:=xlValidateDate, AlertStyle:=xlValidAlertStop, Operator:=xlGreaterEqual, Formula1:="1/1/1000"
.ErrorMessage = "You must enter a date value. Format:mm/dd/yyyy"
End With
Any suggestions on how to resolve this?