Command methods
Commands provide the following methods:
- Check()
- Disable()
- Enable()
- Hide()
- Run()
- Show()
- Uncheck()
Check()
The Check() method causes the command to appear checked if it is displayed in a menu or on a toolbar.
Disable()
The Disable() method causes the command to appear disabled if it is displayed in a menu or on a toolbar. Once disabled, the command cannot be run.
Enable()
The Enable() method causes a previously disabled command to become enabled. It will appear enabled if it is displayed in a menu or on a toolbar.
Hide()
The Hide() method causes a command to be hidden in any menu or toolbar in which it appears. The command can still be run.
Run()
The Run() method performs the action of the command. For form commands, it opens the corresponding form. For script commands, it executes the script code that is attached to the command.
Show()
The Show() method causes a previously hidden command to be displayed in any menu or toolbar in which it appears.
Uncheck()
The Uncheck() method causes the command to appear unchecked if it is displayed in a menu or on a toolbar.