I have several shapes on the worksheet that have macros assigned to them.
I want to specifically disable/deactivate those SHAPES while the sheet is PROTECTED.
Reason being is that at the moment when the sheet is PROTECTED (via VBA) and I then subsequently click on one of the shapes it causes the assigned Sub to not run/freeze/bug out.
So I thought the best approach would be to disable/deactivate those shapes while the Sheet is PROTECTED.
There are other "btn" shapes on the sheet, if they can be disable/deactivate on mass then it would avoid the need to name them individualy
But to date none of my attempts have worked.
This is my last failed attempt:
I want to specifically disable/deactivate those SHAPES while the sheet is PROTECTED.
Reason being is that at the moment when the sheet is PROTECTED (via VBA) and I then subsequently click on one of the shapes it causes the assigned Sub to not run/freeze/bug out.
So I thought the best approach would be to disable/deactivate those shapes while the Sheet is PROTECTED.
There are other "btn" shapes on the sheet, if they can be disable/deactivate on mass then it would avoid the need to name them individualy
But to date none of my attempts have worked.
This is my last failed attempt:
VBA Code:
Sub ProtectSheet()
ActiveSheet.Protect ActiveSheet.Shapes("btnSelectTheSubToRun").ControlFormat.Enabled = False
End Sub