PasteSpecial macro not working after cut

musicgold

Board Regular
Joined
Jan 9, 2008
Messages
197
Hi,

I am trying to cut a range in workbook1 and paste it using a PasteSpecial macro in Workbook2, but I am getting an error. The PasteSpecial macro works fine when I copy the range instead of cutting it.


In macro 1, I use the following code to cut a range into the clipboard:
Code:
Range(Temp, Temp.Offset(0, 6)).Cut

In macro2, I try to use the following code to paste the range in the clipboard, but I am getting an error : 1004 - PasteSpecial method of Range class failed.

Code:
 ActiveCell.PasteSpecial xlPasteValues

Why is it not working?

Thanks
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You can't PasteSpecial after a cut, you need to Copy, PasteSpecial then delete the original line.
 
Upvote 0

Forum statistics

Threads
1,214,866
Messages
6,121,996
Members
449,060
Latest member
mtsheetz

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