I realize that this is an old thread but I was having a similar problem and none of the workarounds I found on the web were adequate.
http://www.excelforum.com/excel-prog...st-in-vba.html
If you are trying to add validation and receive "Error 1004: Application or object defined error." This is because the formula you are applying to the validation evaluates to an error on the first cell in the range that the validation is being added to.
To solve this, I had another location in the worksheet that had the same relative data validation formula. I Selected that cell in VBA and used the Copy method. The I selected the range that I needed the data validation applied to and did a Selection.Pastespecial and pasted only the validation. The line of code is shown below.
This allowed the procedure to run without error.Please Login or Register to view this content.
Bookmarks