DeleteMenuItem method

Applies to  

Example

Description

Use this method to delete your own user-defined menus.

Syntax

[ReturnValue =] Object.DeleteMenuItem (MenuCmdNo)

Part

Data type

Description

Object

Object

An object expression that evaluates to an object in the Applies To list.

MenuCmdNo

Long

Any of the twenty constants possible specified in Menu constants.

Settings

Return value

Data type: Integer

Description: Returns 0 if the command is removed from the menu. Returns 1 if the operation did not succeed. See Event return value constants.

Remarks

Only user-defined menus can be deleted.

Classic method

XxxxDeleteMenuItem