Excel Add ing validation in Excel code

Joined
Oct 31, 2008
Messages
1
Reaction score
0
In my excel spread sheet I am adding the following code to show a list

Target.Cells.Validation.Add 1, 1 , , , "=$A$1:$A$10"

It gives me the following error message :
Run-time error '1004' :
Application-defined or object-defined error.

I do have data in A1 to A10 cells. I am not sure how to fix this.
Any help is greatly appreciated.
 
Back
Top