Forum Discussion
Lock shapes in PowerPoint, Word and Excel
- Nov 03, 2022
There is no such visual feature in Excel, but the capability of preventing users from moving, editing, or even selecting shapes is present in Excel, and mostly (if not entirely) can be invoked from VBA.
Microsoft Excel terminology is poor in this area, so note that "the ability to lock shapes" is not the same as "the ability to prevent changes to shapes". (It's as though "Locked" means a lock has been installed, not whether that lock is engaged or not.)
Martin is correct about the two-step process -- the changing (if necessary) of Locked status to true, and protecting the worksheet. So see the attached workbook, and let us know why use of Locked status and the worksheet's Protect method (and possibly the Unprotect method) does not satisfy your requirement.
What I do not see is the capability in VBA to set (or unset) the "Lock text" property of the shape I tested. But as this is set by default, perhaps that is not an issue for you.
There is no such visual feature in Excel, but the capability of preventing users from moving, editing, or even selecting shapes is present in Excel, and mostly (if not entirely) can be invoked from VBA.
Microsoft Excel terminology is poor in this area, so note that "the ability to lock shapes" is not the same as "the ability to prevent changes to shapes". (It's as though "Locked" means a lock has been installed, not whether that lock is engaged or not.)
Martin is correct about the two-step process -- the changing (if necessary) of Locked status to true, and protecting the worksheet. So see the attached workbook, and let us know why use of Locked status and the worksheet's Protect method (and possibly the Unprotect method) does not satisfy your requirement.
What I do not see is the capability in VBA to set (or unset) the "Lock text" property of the shape I tested. But as this is set by default, perhaps that is not an issue for you.
- LuisElCaminanteNov 11, 2022Brass ContributorThank you very much Martin_Weiss and SnowMan55,
I had overlooked that option in the shapes, I was expecting to see something similar to what PowerPoint has, but now I know how I could mimic that feature in Excel.
Thank you very much, thank you very much.