The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 script for en/disable protection for worksheet

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
imoada Posted - 10/21/2014 : 04:07:03 AM
Origin 9.1 sp3 64-bit
Win7 ultimate sp1

hello

Does anyone know how to use script (LabTalk) to enable/disable "Disable Editing" in "workshee properties -> Format -> Text Control" for "Standard/Data/Column Label/Long Name/Comments" in drop-down list of "apply to", respectively?

Thanks in advance.

Imoada
5   L A T E S T    R E P L I E S    (Newest First)
MaxMace Posted - 11/06/2014 : 07:54:06 AM
I've been searching for this for a while. I guess the solution from Greg is the easiest way to do it. I'm pretty new into this thing, so it may take some time for me to figure it out, though. Wish me luck!

It's a beautiful day!
greg Posted - 10/23/2014 : 10:00:58 AM
You can turn the Disable Editing checkbox on and off via script using two theme files and the themeApply2w X-Function.
Send an email to tech@originlab with the Subject line Disable Editing Themes and be sure to include your Origin Serial Number in the email.
cpyang Posted - 10/22/2014 : 10:27:56 PM
Hi imoada,

There is no simple Labtalk way to control the Disable Editing checkbox in Cell Formatting, or Worksheet Property dialog, even though it can be done using Origin C.

What Greg pointed out is that you may also lock the entire sheet up to prevent editing by simply using the Labtalk command
lay -lw 2

for the active sheet. For more details, see

https://originlab.jira.com/wiki/display/main/Workbook+Protection

or the layer -lw command in

http://www.originlab.com/doc/LabTalk/ref/Layer-cmd#-lw.3B_turn_on_protection_on_worksheet_level


CP
imoada Posted - 10/21/2014 : 6:02:10 PM
Thank greg.

I know your answer. "Layer" command can't make change to the check box of "Disable Editing", this may cause coufusions to new origin user. Beside "layer" command, is there any other way to treat worksheet in accordance with my requirement.
greg Posted - 10/21/2014 : 3:10:27 PM
Check the Help file for the LAYER command...

layer -lw 2; // Make active sheet READ ONLY
layer -lw 0; // Restore READ/WRITE

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000