Disabled (OlapMenuItem)

Analysis Services Programming

Analysis Services Programming

Disabled (OlapMenuItem)

The Disabled property of an OlapMenuItem object determines whether the menu item is enabled or disabled.

Data Type

Boolean

Access

Read/write

Remarks

This property determines the visible state of the tree node menu item. If disabled, the menu item appears dimmed.

Example

The following example displays a message box if the selected menu item is disabled:

Private Function IOlapAddIn_ExecuteMenuItem( _
    CurrentNode As DSSAddInsManager.IOlapTreeNode, _
    MenuItem As DSSAddInsManager.IOlapmenuItem) _
    As DSSAddInsManager.RefreshTreeTypes
  On Error GoTo ExecuteMenuItem_Err 'Handle errors
  'Some more code
  If MenuItem.Disabled = TRUE Then
    MsgBox "Disabled: Cannot execute at this time"
  End If
  Exit Function
ExecuteMenuItem_Err:
  MsgBox "ExecuteMenuItem failed"
  Err.Clear
End Function

See Also

OlapMenuItem