Copy and Paste error - multiple selections?? HELP!

cbowman

New Member
Joined
Sep 30, 2003
Messages
3
OK, I am very new to macros so I am not sure what I am doing wrong in the code below. I get the following error message: Run-time error '1004': That command cannot be used on multiple selections." :pray: Do I need to use totally different code, or should I change the code to work around the error? Interesting is the fact that this works fine on Excel 2001 for the Mac, but that is the only version on either platform that it works on.

Thanks in advance for any help. :-D

Sheets("QPM_Database").Range("D:D,F:F").Copy
Sheets("QPM_ReportData").Paste Destination:=Worksheets("QPM_ReportData").Range("A:A,B:B")
Sheets("QPM_Database").Range("C:C,B:B,V:V").Copy
Sheets("QPM_ReportData").Paste Destination:=Worksheets("QPM_ReportData").Range("C:C,D:D,E:E")
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi cbowman,
I've run into this with the PasteDestination statement too. The way I work around it is to change the code to something more like:

Sheets("QPM_Database").Range("D:D,F:F").Copy
Sheets("QPM_ReportData").Range("A1").Select
ActiveSheet.Paste

And go on from there.

Hope this helps.
 
Upvote 0
Thanks Iridium,
I have not had a chance to try it out but it looks like a logical solution.
cbowman
 
Upvote 0

Forum statistics

Threads
1,223,923
Messages
6,175,399
Members
452,640
Latest member
steveridge

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