Issue
This Content is from Stack Overflow. Question asked by Jesse
Currently having an issue where a textbox inside a group of textboxes continues to allow a user to both move and change the text despite the properties of that textbox being set to “locked” (including the lock text button), this is while the sheet is set to protected. As these groups are set via a VBA code to only display with certain cell values, could this be why the textboxes continue to allow the user to both move them and change the text? If so, is there a specific VBA code I need to input to independently lock specific textboxes within a group?
A snippet of the VBA code to display or hide the textboxes is as follows;
If ActiveSheet.Range("D20") = "Dbl-Bev" Or ActiveSheet.Range("D20") = "Dbl-Bev Out" Or ActiveSheet.Range("D20") = "Dbl-Bev In" Then
ActiveSheet.Shapes("RightTop1").Visible = True
ActiveSheet.Shapes("RightBot1").Visible = True
ActiveSheet.Shapes("RightL1").Visible = False
Else
If ActiveSheet.Range("D20") = "K-Bev" Or ActiveSheet.Range("D20") = "K-Bev Out" Or ActiveSheet.Range("D20") = "K-Bev In" Then
ActiveSheet.Shapes("RightTop1").Visible = True
ActiveSheet.Shapes("RightBot1").Visible = True
ActiveSheet.Shapes("RightL1").Visible = True
Else
If ActiveSheet.Range("D20") = "Out-Bev L" Then
ActiveSheet.Shapes("RightBot1").Visible = True
ActiveSheet.Shapes("RightL1").Visible = True
ActiveSheet.Shapes("RightTop1").Visible = False
Else
etc.
I’d prefer to keep these textboxes grouped as independently setting their visibility seems like it would be a pretty large undertaking (and wall of text). Any feedback on this issue would be greatly appreciated!
Solution
SOLVED: This was an embarrassingly easy fix – I needed to make sure edit objects was unticked when I was protecting the sheet.
This Question was asked in StackOverflow by Jesse and Answered by Jesse It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.