IMenuItems.Add Method
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Add ( _
Caption As String, _
OnAction As Object, _
ShortcutKey As Object, _
Before As Object, _
Restore As Object, _
StatusBar As Object, _
HelpFile As Object, _
HelpContextID As Object _
) As MenuItem
'Usage
Dim instance As IMenuItems
Dim Caption As String
Dim OnAction As Object
Dim ShortcutKey As Object
Dim Before As Object
Dim Restore As Object
Dim StatusBar As Object
Dim HelpFile As Object
Dim HelpContextID As Object
Dim returnValue As MenuItem
returnValue = instance.Add(Caption, OnAction, _
ShortcutKey, Before, Restore, StatusBar, _
HelpFile, HelpContextID)
MenuItem Add(
string Caption,
Object OnAction,
Object ShortcutKey,
Object Before,
Object Restore,
Object StatusBar,
Object HelpFile,
Object HelpContextID
)
Parameters
- Caption
Type: System.String
- OnAction
Type: System.Object
- ShortcutKey
Type: System.Object
- Before
Type: System.Object
- Restore
Type: System.Object
- StatusBar
Type: System.Object
- HelpFile
Type: System.Object
- HelpContextID
Type: System.Object
Return Value
Type: Microsoft.Office.Interop.Excel.MenuItem