Partager via


MenuItem::Enabled property

The Enabled property returns whether the menu item is enabled or disabled. This property is read-only.

Syntax

Property Enabled As Long

Property value

1 if the menu item is enabled; otherwise, the return value is 0.

Examples

' Retrieve the Enabled property for the MenuItem object.
Dim nEnabled As Long
nEnabled = objMenuItem.Enabled
If (1 = nEnabled) Then
    MsgBox (objMenuItem.DisplayName & " is enabled")
Else
    MsgBox (objMenuItem.DisplayName & " is disabled")
End If

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
MMCObj.h
IDL
MMCObj.idl
DLL
Mmcndmgr.dll
IID
IID_MenuItem is defined as 0178FAD1-B361-4B27-96AD-67C57EBF2E1D

See also

MenuItem.Execute