VBA: copying pasteing data validation

BIGTONE559

Active Member
Joined
Apr 20, 2011
Messages
336
I'm seem to be having an issue with syntax.

I normally use the following:
Code:
Sub COPYFORMAT()
Application.EnableEvents = False

Sheets(3).Range("A11:O45").Copy
Sheets(4).Range("A11:O45").PasteSpecial xlFormats
Sheets(5).Range("A11:O45").PasteSpecial xlFormats
Sheets(6).Range("A11:O45").PasteSpecial xlFormats
Sheets(7).Range("A11:O45").PasteSpecial xlFormats
Sheets(8).Range("A11:O45").PasteSpecial xlFormats
Sheets(9).Range("A11:O45").PasteSpecial xlFormats
Sheets(10).Range("A11:O45").PasteSpecial xlFormats
Sheets(11).Range("A11:O45").PasteSpecial xlFormats
Sheets(12).Range("A11:O45").PasteSpecial xlFormats
Sheets(13).Range("A11:O45").PasteSpecial xlFormats
Application.EnableEvents = True
End Sub

I'm trying to do the same for DataValidation however, i must have something wrong because it keeps throwing an error 1004

Code:
Sub Datavalcopy()
Application.EnableEvents = False

Sheets(3).Range("A11:A45").Copy

Sheets(4).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(5).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(6).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(7).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(8).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(9).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(10).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(11).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(12).Range("A11:A45").PasteSpecial xlDataValidation
Sheets(13).Range("A11:A45").PasteSpecial xlDataValidation
Application.EnableEvents = True


End Sub

Help Appreciated
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top