
Originally Posted by
porucha vevrku
Using
mikerickson's solution and shortening the duplicate code ("If Not Intersect ...", "For ... Each ... Next"), it could look like this:
... but, how the "change" procedure can be started at all, if the worksheet is protected and you can not enter anything into its cells before you unlock/unprotect the worksheet ? What "mechanism" allows you to perform the "change" procedure ? Do you have any cells there that are not blocked ?
Hi porucha vevrku - many thanks for the detailed code.
In the worksheet only certain cells are protected - including a range permission restricting users ability to input into cells unless they are named in the permissions list.
The code is a safety and audit measure to check whom is inputting into the permission controlled range so that - if for any reason someone other than those named could populate into it, the system creates a stamp so it can be investigated.
In regards to your code I will go away and test - I have not seen
before!
Thanks all for your input - if you have any more or alternative code it would be interesting to see the approaches!
EDIT: To check should the above code have a
and
lines above the errorhandler: code?
EDIT: Also I have note come across defining variables like this before:
- could you please explain this?
EDIT: Lastly think
needs to be changed to
for the duplication check to work correctly.
PASS123 - Copy.xlsm
Bookmarks