Forum Discussion
MukulPurohit
Mar 14, 2024Copper Contributor
Option buttons in protected sheet get unselected
Hello Team,
I have created one group box and added two Option Buttons (form Control) inside it. And I have Linked the option buttons to cell $I$6.
I want to show 2nd option button as selected and so I set the value off $I$6 to 2. (This makes the second option box selected)
Then I mark Cell $I$6 as locked as I do not want user to be able to change the option selection.
When I mark the sheet as protected and I click on 1st Option Button I get an expected error message -
But when I click OK on this both the option boxes get unselected and the linked cell value is still showing 2.
Expected behavior is that the second option should still be shown as selected ... but it is not !!!
Can you please help me with this?
Regards
Mukul
- djclementsBronze Contributor
MukulPurohit One possible workaround to achieve what you're asking for is to insert a text box overtop of the group box and option buttons, then format the text box with "No fill" and "No line". When protecting the worksheet, make sure the option to "Edit objects" is unchecked, which will make the text box, as well as the objects beneath it, inaccessible to the user.
Text Box Overlay
Note: this can also be done by inserting a shape (rectangle), but you would need to format the shape with "Solid fill" and 100% Transparency.
- JKPieterseSilver Contributor
MukulPurohit Unprotect the sheet, right-click the cell the option buttons are attached to and press control+1. Click the Protection tab and uncheck locked. Now protect the sheet again.
- MukulPurohitCopper Contributor
Thank you for your reply ... it seems it still does not work..
I tried marking all the cells in the excel as Unlocked except for linked cell.( I do not want user to be able to change the option selection.).. I still observe the same behavior!!!
Regards
Mukul
- JKPieterseSilver Contributor
MukulPurohit If you do not want the users to change the option, why are they there? I suggest to "just" use a data validation drop-down in a cell with the two choices that are currently shown on the option buttons. For that protection works as expected.