Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default PasteSpecial problem

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default PasteSpecial problem

The problem being that xlPasteValidation isn't defined in Excel 2000.

--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default PasteSpecial problem

I thought it might have been that xl2k recorded it incorrectly:

xlDataValidation
instead of
xlpastevalidation

(don't have xl2k to check)

Jim Rech wrote:

The problem being that xlPasteValidation isn't defined in Excel 2000.

--
Jim Rech
Excel MVP


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PasteSpecial problem Jim Rech Excel Programming 0 November 4th 03 04:47 PM
Copy & PasteSpecial Arthur[_3_] Excel Programming 1 November 3rd 03 06:41 PM
A More Effective Way of Using PasteSpecial? CalumMurdo Kennedy Excel Programming 7 October 30th 03 02:49 AM
PasteSpecial failed CR[_2_] Excel Programming 1 August 1st 03 10:57 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"