protection is simply to avoid casual mistakes.) I then password protected the
sheet, setting the attribute that disables user selection of protected cells.
All this done via the Calc GUI.
I then wrote a Basic macro to manipulate the spreadsheet. The macro removes
the sheet protection, manipulates the sheet and finally reapplies the sheet
protection. However, the macro sheet protection does not honour the originally
applied "disable user selection of protected cells" attribute. Is it possible for a
Basic macro to disable user selection of protected cells? If so, then how can this
be done?
The relevant code I am using is:-
Code: Select all
Dim Sheet As Object
Sheet = ThisComponent.getcurrentcontroller.activesheet
Sheet.unprotect("mypasswd")
Sheet.protect("mypasswd")
sheet protection didn't produce anything useful.