AX1253

Protection command

Use the Protection command to toggle workbook and worksheet protection on and off. This works the same way as the Protect button on the default Axiom ribbon tab.

NOTE: This command is intended to allow administrators and other power users to temporarily remove protections that have been set via the Control Sheet, and then reapply them. Using this command does not change the settings on the Control Sheet itself (meaning it will not enable or disable protection settings). The Control Sheet should always be used if you want to enable or disable protections.

Can be used in

  • Ribbon tabs
  • Task panes

This command is included in the default AxiomMain.AXL ribbon tab, as part of the Advanced group.

When the Protection command is selected from the Command Library as the shortcut target, it displays as command://Protection or command://ProtectionCommandAdapter (legacy syntax).

Shortcut parameters

This command uses a single shortcut parameter named Mode. This parameter determines the behavior of the item:

Mode Description

Menu

Displays the full Protect menu, with the toggles for Workbook and Worksheet as items on a drop-down menu. This is the default selection.

Workbook

Allows toggling Workbook protection on and off using a check box.

Worksheet

Allows toggling Worksheet protection on and off using a check box.

The default display text for the command will automatically adjust based on the Mode selection.

Visibility

Items using this command are visible if both of the following conditions are met:

  • The current file is a spreadsheet file that supports workbook and worksheet protection.

  • The current user is an administrator, or a user with the global Remove Protection permission, or a user with the Allow Unprotect permission to the current file.

You can use the Show restricted items option in the task pane or the ribbon tab to force items that use this command to be visible at all times (but grayed out if unavailable).