Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
I need to copy the validation from one cell to the other. Recording a macro gives me the following code: Range("A1").Select Selection.Copy Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValidation, Operation:=xlNone, SkipBlanks:=False, Transpose:=False What I was wondering if there is a way to do this without having to go through the whole .Select. I do this a few times when a button is pushed and I don't want to confuse the user by having a moving selection. I also tried to do a Range("A2").Validation = Range("A1").Validation but that wouldn't work. Any idea? Thanks! Joe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Joe,
Sorry if this is a late entry, but my OE shows this as not having been answered: Range("A1").Copy Range("A2").PasteSpecial Paste:=xlPasteValidation Application.CutCopyMode = False HTH, Bernie MS Excel MVP "Joe HM" wrote in message oups.com... Hello - I need to copy the validation from one cell to the other. Recording a macro gives me the following code: Range("A1").Select Selection.Copy Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValidation, Operation:=xlNone, SkipBlanks:=False, Transpose:=False What I was wondering if there is a way to do this without having to go through the whole .Select. I do this a few times when a button is pushed and I don't want to confuse the user by having a moving selection. I also tried to do a Range("A2").Validation = Range("A1").Validation but that wouldn't work. Any idea? Thanks! Joe |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bernie -
Thanks so much for your reply ... it was not late and very helpful. Gush ... I could have thought of that myself! Thanks again, Joe |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried copying a cell with validation in xl2000 to a new cell and it works
fine. Yet when I write a macro doing the same thing I get an error. If I repeat the process using Excel2002 no problems. This is driving me crazy. Any suggestions? -- Thanks, HR "Joe HM" wrote: Bernie - Thanks so much for your reply ... it was not late and very helpful. Gush ... I could have thought of that myself! Thanks again, Joe |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the code, change:
Paste:=xlDataValidation to: Paste:=6 HR wrote: I tried copying a cell with validation in xl2000 to a new cell and it works fine. Yet when I write a macro doing the same thing I get an error. If I repeat the process using Excel2002 no problems. This is driving me crazy. Any suggestions? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I made the changes to the program and it worked like a champ. I am rolling
out a spreadsheet to 100 salespeople that use EXCEL 2000 and now the spreadsheet works. I had previously rolled out the spreadsheet and had major problems since I had written the macro to work on Excel 2002 (where is works). Thanks again your a life savor. -- Thanks, HR "Debra Dalgleish" wrote: In the code, change: Paste:=xlDataValidation to: Paste:=6 HR wrote: I tried copying a cell with validation in xl2000 to a new cell and it works fine. Yet when I write a macro doing the same thing I get an error. If I repeat the process using Excel2002 no problems. This is driving me crazy. Any suggestions? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation - copy paste ! | Excel Worksheet Functions | |||
copy dependant validation cell | Excel Discussion (Misc queries) | |||
Copy workbook- Validation function | Excel Worksheet Functions | |||
Excel2000: How to copy data validation using VBA | Excel Programming | |||
Using Validation list to copy from another Workbook | Excel Programming |