I have a spreadsheet on which I record results of games in a tournament. At the end of the day, I use a macro to sort the players' records to find the winner.
I have the sheet protected so other users can't mess with the calculations. The macro unprotects the sheet, sorts the records, then protects the sheet again.
In the protection step, it brings up a dialogue box for password entry; I'm not using a password and would like the box to not appear. Is this possible?
[Solved] Sheet protection in Calc
-
- Posts: 2
- Joined: Wed Feb 22, 2017 4:16 am
[Solved] Sheet protection in Calc
Last edited by RoryOF on Wed Feb 22, 2017 7:58 am, edited 2 times in total.
Reason: Added green tick. [RoryOF, Moderator]
Reason: Added green tick. [RoryOF, Moderator]
OOoV3.3 OSVista
Re: Sheet protection in Calc
This code protects the sheet called Sheet1 without asking for a password.
If you have trouble integrating that into your code, please post your code so we can make suggestions.
Code: Select all
oSheets = ThisComponent.Sheets
oSheet = oSheets.getByName("Sheet1")
oSheet.protect("")
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
-
- Posts: 2
- Joined: Wed Feb 22, 2017 4:16 am