Hi folks,
I have a spreadsheet which is user-editable (unlocked cells only - other cells are locked with password protection).
I have two option buttons; when one of them is toggled, several cells are programmed with vba to .clearcontents. When the other option button is toggled those same cells are programmed with vba to .value = 1, and are therefore all populated again with the number 1. The user can toggle between each option button as and when they please.
I need some code for the following: when the .clearcontents option button is toggled, I want those cleared cells to then immediately become LOCKED like all the other locked cells, until such a time where the .value = 1 option button is toggled again when they will unlock, and vice versa.
Essentially I do not want users to be able to click on or enter anything into those .clearedcontents cells whilst that option button is toggled.
Thanks.
I have a spreadsheet which is user-editable (unlocked cells only - other cells are locked with password protection).
I have two option buttons; when one of them is toggled, several cells are programmed with vba to .clearcontents. When the other option button is toggled those same cells are programmed with vba to .value = 1, and are therefore all populated again with the number 1. The user can toggle between each option button as and when they please.
I need some code for the following: when the .clearcontents option button is toggled, I want those cleared cells to then immediately become LOCKED like all the other locked cells, until such a time where the .value = 1 option button is toggled again when they will unlock, and vice versa.
Essentially I do not want users to be able to click on or enter anything into those .clearedcontents cells whilst that option button is toggled.
Thanks.