[Solved] Macro to Toggle Sheet Protection

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
daveg7
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

[Solved] Macro to Toggle Sheet Protection

Post by daveg7 »

I'd like it to not allow viewing locked text.

Thanks!
Last edited by daveg7 on Mon Oct 02, 2017 6:01 am, edited 4 times in total.
OpenOffice 4.1.3 with Windows 10
OpenOffice 4.1.3 with MacOS 10.4
Excel 2003 and 2010 with Windows 10 Pro and 32 GB Ram
Excel with MacOS 10.4
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Macro to Toggle Sheet Protection

Post by Villeroy »

Enough is enough. You can not ask for another code snippet every hour. We are no human macro recorders.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Macro to Toggle Sheet Protection

Post by Zizi64 »


Macro to Toggle Sheet Protection

I'd like it to not allow viewing locked text.
Thanks!
Please
- search in this Forum - viewtopic.php?f=9&t=73949&p=334075
- search on the web - http://ooo-forums.apache.org/en/forum/v ... 20&t=78225
- read Andrew Pitonyak's free macro books - http://www.pitonyak.org/oo.php
- study the API (Application Programming Interface) desctiptions - http://www.openoffice.org/api/
- download, install and USE an object inspection tool - like the MRI or the XrayTool if you want create (WRITE) macros (you can find them in this forum)
- upload YOUR code what YOU TRIED to create - we will examine it andthen maybe we can give you help to fix it.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
daveg7
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

Re: Macro to Toggle Sheet Protection

Post by daveg7 »

Villeroy wrote:Enough is enough. You can not ask for another code snippet every hour. We are no human macro recorders.
My apologies. I didn't realize I was abusing the system. (I'm doing exactly one spreadsheet to help out a personal friend who is doing a beautiful nonprofit project, and I know I'll never make the time to learn these languages or syntaxes, though it does looks interesting.)

Thank you for all your kindnesses and the huge help I've already received.

David G.
OpenOffice 4.1.3 with Windows 10
OpenOffice 4.1.3 with MacOS 10.4
Excel 2003 and 2010 with Windows 10 Pro and 32 GB Ram
Excel with MacOS 10.4
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved, kind of] Macro to Toggle Sheet Protection

Post by Zizi64 »

and I know I'll never make the time to learn these languages or syntaxes, though it does looks interesting.)
:crazy:

...And your friend can not ask?
(There are localized Forums for many languages: https://forum.openoffice.org/)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
daveg7
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

Re: [Solved, kind of] Macro to Toggle Sheet Protection

Post by daveg7 »

My friend is the "client," and she's depending on me. I keep telling her I don't know OpenOffice basic. She knows a lot less. In fact, she's no techie at all, and I'm the only one available to her.

I do have some experience with Excel VBA, but she wants everything free and knows I can't say no to her. Also, her project is worth my support.

;)

Thanks for asking. I wish I were in Budapest right now, but the Berkeley, California coffee shops aren't too bad, and some of them have sidewalk tables.
OpenOffice 4.1.3 with Windows 10
OpenOffice 4.1.3 with MacOS 10.4
Excel 2003 and 2010 with Windows 10 Pro and 32 GB Ram
Excel with MacOS 10.4
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved, kind of] Macro to Toggle Sheet Protection

Post by Zizi64 »

I don't know OpenOffice basic. She knows a lot less.
It will be a "long time project..." :D :bravo:

But: you must study the API (Application Programming Interface) functions, and not the very simple OpenOffice Basic (StarBasic) IDE and the StarBasic programming language...
That is the difference:
The MS VBA is a programming language and an IDE and a function library in one.
The AOO/LO StarBasic is a programming language and it has an IDE too, but the functions for controlling of the opensource office suite (the API functions) are independent from the Basic. You can use them from more other supported programming languages and environments.
Last edited by Zizi64 on Fri Sep 29, 2017 9:43 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
daveg7
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

Re: [Solved, kind of] Macro to Toggle Sheet Protection

Post by daveg7 »

Thank you, and I'll seriously consider your advice.

Köszönöm (just looked up the one word, and I know very little more than that about the languages we're discussing. ;)
OpenOffice 4.1.3 with Windows 10
OpenOffice 4.1.3 with MacOS 10.4
Excel 2003 and 2010 with Windows 10 Pro and 32 GB Ram
Excel with MacOS 10.4
Post Reply