mcomp72
Active Member
- Joined
- Aug 14, 2016
- Messages
- 275
- Office Version
- 365
- 2019
- 2016
- 2011
- Platform
- Windows
- MacOS
I have a macro-enabled workbook that is used on both Windows & Mac. There are some columns that are "locked" because they have formulas in them, and I don't allow the user to unlock them, or to unprotect the sheets. Sometimes a user will try to paste data into some cells on a sheet, and one of the cells is locked. They get the standard message from Excel that says they can't do that since the cell is on a protected sheet. What I'm wondering if, is there some way I could intercept the PASTE command before it actually attempts to do the paste, and have it check the range that they are trying to paste into? If they are trying to paste into a cell that is locked, I would like it to display a message box with a custom message, explaining exactly which cell/column that cannot paste into.
I have Googled around for a solution, but haven't had any luck. It may not be possible to intercept the PASTE command, but if it is, I figure someone here would probably know.
One thing to remember is I would need to solution work on Mac as well as Windows. So any solution that uses Windows API's wouldn't work in this case.
I have Googled around for a solution, but haven't had any luck. It may not be possible to intercept the PASTE command, but if it is, I figure someone here would probably know.
One thing to remember is I would need to solution work on Mac as well as Windows. So any solution that uses Windows API's wouldn't work in this case.