LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Copying only data validation

Or for versions earlier than Excel 2002:
Paste:=6

XL97: Problems with Arguments of PasteSpecial Method
http://support.microsoft.com/default.aspx?id=171281

Debra Dalgleish wrote:
Try Paste:=xlPasteValidation

JarredW wrote:

Hi,
I'm wondering if anyone can help. I'm writing code in VBA in Excel to
copy only the data validation from a selected line in one workbook to
a range in another workbook. When i use my code it brings the error
message: "Paste Special Method of range class failed" My code is as
below:
Windows(file2).Activate Rows("3:3").Select Selection.Copy
Windows(File).Activate Range(Cells(1, 1), Cells(400,
13)).Select Selection.PasteSpecial Paste:=xlDataValidation,
Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False
I've looked in the Excel help, and this says that 'xlDataValidation'
is not an option for PasteSpecial. There must be a way to only paste
the validation! Any help would be appreciated.
Jarred.






--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
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
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
copying data validation to another workbook billf Excel Discussion (Misc queries) 3 March 14th 10 07:19 PM
Excel 2000 - copying/pasting formula for validation purposes Silena K-K Excel Discussion (Misc queries) 5 December 2nd 07 07:39 PM
Validation fails on copying x6v87qe Excel Discussion (Misc queries) 3 May 8th 07 09:10 AM
Copying data down to next dirty cell, then copying that data slarson Excel Programming 0 September 15th 03 09:19 PM


All times are GMT +1. The time now is 02:13 PM.

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

About Us

"It's about Microsoft Excel"