How to catch copy / paste event

dabbieidason

New Member
Joined
Aug 16, 2012
Messages
1
First of all I want to thank you guys for this forum. Helped me to many times!

But now I'm pretty stuck on one problem.

My workbook use protection. Special cells are locked if not empty. I use WorkSheet_Change(), when some cell is changed, every locked cell will be protected and need to unprotect worksheet if I want to change locked cells.
This works like a charm, buuuut...

If I copy any row, and then paste it somewhere it will do (if the worksheet is unprotected).
But apparently WorkSheet_Change() doesn't think paste is any change, and the worksheet is unprotected.


It would be great if there is some event handler to catch paste event (then I could just simply lock the worksheet), but I haven't find any.

Any advice?

Thanks alot guys for everything!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,214,848
Messages
6,121,917
Members
449,055
Latest member
KB13

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