I recorded a macro in xl2002 and got this back:
xlPasteValidation
And from the immediate window:
?xldatavalidation
<<empty here
?xlpastevalidation
6
Sachin wrote:
Hi,
I am working on Excel 2000 on Win 2K Prof.
The need is to paste the 'Validation' from one column to
another at run time.
Obviously, what I do is 'Record a macro' and manually
do 'copy' from the source cell and 'pastespecial'
with 'validation' on the target cell and it is done.
Code that comes up is :
Range("A1").Select
Selection.Copy
Range("A6").Select
Selection.PasteSpecial Paste:=xlDataValidation,
Operation:=xlNone, _SkipBlanks:=False, Transpose:=False
Now, when I try to run this code dynamically it gives an
error saying 'PasteSpecial method of Range class failed -
error 1004'.
Any clues ?????
Many Thanks,
Sachin
--
Dave Peterson