Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel2000: How to copy data validation using VBA
Hi
How doesn't the code from below work? I get Run-time error '1004': PasteSpecial method of Range class failed! .... Sheets("SheetName").Range("A1:D1").Offset(RowNo - 2, 0).Copy Sheets("SheetName").Range("A1:D1").Offset(RowNo - 1, 0).PasteSpecial _ Paste:=xlDataValidation, Operation:=xlNone, SkipBlanks:=False, Transpose:=False .... It does work with xlPasteFormats Sheets("SheetName").Range("A1:D1").Offset(RowNo - 1, 0).PasteSpecial _ Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False I'm writing an Open event for workbook, which when needed adds new records into table, and copies some data valdation lists from existing rows into new ones. Thanks in advance for any help -- Arvi Laanemets (When sending e-mail, use address arvil<Attarkon.ee) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel2000: How to copy data validation using VBA
Solved (found a hint from web)!
Sheets("SheetName").Range("A1:D1").Offset(RowNo - 1, 0).PasteSpecial _ Paste:=xlDataValidation, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Sheets("SheetName").Range("A1:D1").Offset(RowNo - 1, 0).PasteSpecial _ Paste:=6, Operation:=xlNone, SkipBlanks:=False, Transpose:=False -- Arvi Laanemets (When sending e-mail, use address arvil<Attarkon.ee) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel2000: Data validation behaving funny | Excel Discussion (Misc queries) | |||
In EXCEL2000, How can I copy a file and make it usable in MS WORK | Excel Discussion (Misc queries) | |||
Excel2000: Data Validation to restrict entries | Excel Discussion (Misc queries) | |||
Excel2000: Custom data validation and named ranges | Excel Discussion (Misc queries) | |||
Excel2000: Copy all exept data | Excel Programming |