Visual Basic Reference

ObjectVerbFlags Property

See Also    Example    Applies To

Returns the menu state (such as enabled or disabled, checked, and so on) for each verb in a given ObjectVerbs array.

Syntax

object**.ObjectVerbFlags(number)**

The ObjectVerbFlags property syntax has these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
Number A numeric expression indicating the element in the array.

Return Values

The ObjectVerbFlags property returns the following values:

Constant Value Description
VbOLEFlagChecked &H0008 The menu item is checked.
VbOLEFlagDisabled &H0002 The menu item is disabled (but not dimmed).
VbOLEFlagEnabled &H0000 The menu item is enabled.
VbOLEFlagGrayed &H0001 The menu item is dimmed.
VbOLEFlagSeparator &H0800 The menu item is a separator bar.

Note   These constants are also listed in the Visual Basic objects and procedures library in the Object Browser.

Remarks

The first verb in the ObjectVerbs array is the default verb. The ObjectVerbFlags array contains information about the menu state (such as dimmed, checked, and so on) for each verb in the ObjectVerbs array.

When displaying a menu containing an object's verbs, check the value of this property to see how the item is set to be displayed.