[Solved] Macro to Toggle Sheet Protection

Creating a macro - Writing a Script - Using the API

[Solved] Macro to Toggle Sheet Protection

Postby daveg7 » Thu Sep 28, 2017 12:40 am

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
daveg7
 
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

Re: Macro to Toggle Sheet Protection

Postby Villeroy » Thu Sep 28, 2017 12:51 am

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, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27112
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Macro to Toggle Sheet Protection

Postby Zizi64 » Thu Sep 28, 2017 7:35 am


Macro to Toggle Sheet Protection

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

Please
- search in this Forum - https://forum.openoffice.org/en/forum/v ... 9&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; LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.5; AOO4.1.6
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.
User avatar
Zizi64
Volunteer
 
Posts: 8228
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Macro to Toggle Sheet Protection

Postby daveg7 » Fri Sep 29, 2017 2:24 am

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
daveg7
 
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

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

Postby Zizi64 » Fri Sep 29, 2017 8:20 am

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; LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.5; AOO4.1.6
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.
User avatar
Zizi64
Volunteer
 
Posts: 8228
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

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

Postby daveg7 » Fri Sep 29, 2017 8:27 am

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
daveg7
 
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm

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

Postby Zizi64 » Fri Sep 29, 2017 8:40 am

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; LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.5; AOO4.1.6
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.
User avatar
Zizi64
Volunteer
 
Posts: 8228
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

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

Postby daveg7 » Fri Sep 29, 2017 9:03 am

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
daveg7
 
Posts: 48
Joined: Wed Sep 27, 2017 5:01 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests