InitUserDefinedMenu method

Applies to
UserInterface object

Return Type

This method shows the user defined menu.

Use this method to activate an additional menu on the user interface of a ReadSoft Invoices module, and add one command to that menu.

You can activate only one menu. If you already activated one, this method has no effect.

The menu behavior is different from the other ReadSoft Invoices menus in these ways:

  • The menu is not preserved across module restart.
  • The menu is active at all times while the ReadSoft Invoices module is running. Commands on the menu are available to the user regardless of which child window is active.

None.

object.InitUserDefinedMenu( UserDefMenuName As String, MenuItemCaption As String, MenuItemCommand As String)

Part

Description

object

An expression evaluating to an object of type UserInterface.

UserDefMenuName

The menu name to display on the menu (string).

MenuItemCaption

The text to appear on the first selection on the menu (string).

MenuItemCommand

The name of the command to execute for the first menu selection. The command can be a built-in command or one added using AddCommand. For the names of the built-in commands, see DeleteCommand. (String.)

Error output

Description

CommandNotFound

The command specified by MenuItemCommand is neither a built-in command nor an added command.

UserDefinedMenuAlreadyDefined

A user-defined menu is already initialized. Only one is allowed.

Related topic

AddCommandToMenu