Hi.
I am using the worksheet open event as the trigger to copy and paste editable ranges from other worksheets into a 'summary sheet' but I do not want users to be able to edit the ranges in the resultant 'summary sheet'.
I can get the data okay but the open event seems to be causing looping problems with my attempts to protect the resultant cells so the 'summary sheet' cells remain editable.
I'm using the following to remove the editable ranges:
I've tried using the following to try and disable the event activation without success:
Any help would be appreciated.
TIA.
Cheers,
BJA
I am using the worksheet open event as the trigger to copy and paste editable ranges from other worksheets into a 'summary sheet' but I do not want users to be able to edit the ranges in the resultant 'summary sheet'.
I can get the data okay but the open event seems to be causing looping problems with my attempts to protect the resultant cells so the 'summary sheet' cells remain editable.
I'm using the following to remove the editable ranges:
For Each aer In s1.Protection.AllowEditRanges
aer.Delete
Next
It works fine when I step through it but when I run it, the editable ranges are still there so the open.event must recapture the source cells as editable and I cannot work out how to switch off the event and still have it work.aer.Delete
Next
I've tried using the following to try and disable the event activation without success:
Application.EnableEvents = True/False
Clearly my logic, the order that I am doing it, or the location where I put the code is wrong.
Any help would be appreciated.
TIA.
Cheers,
BJA