PasteSpecial method of Range class failed

Sandman1985

New Member
Joined
Jun 22, 2022
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Hope you're all well.

Not sure if what I am trying to do is possible but I have tried and failed.

I have a macro button that pastes values into the active cell. The sheet is write protected and the maco unlocks the sheet to allow the paste. Unfortunately, the action of unlocking clear the copy from the clipboard so the paste doesn't happen. The paste macro works fine without the unlock. Does anyone know a way I can get it to retain on the clipboard? I thought about getting it to recopy, but the paste destination is dynamic and user defined so will have trouble if copy again in the vba.

Any one have a potential solution I could try? Any help appreciated.

Thanks,

Sandman
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You would need to use the method shown in this thread to do that.

 
Upvote 0
Solution

Forum statistics

Threads
1,215,232
Messages
6,123,765
Members
449,121
Latest member
Vamshi 8143

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