편집

다음을 통해 공유


Workbook.AddinInstall event (Excel)

Occurs when the workbook is installed as an add-in.

Syntax

expression.AddinInstall

expression A variable that represents a Workbook object.

Return value

Nothing

Example

This example adds a control to the standard toolbar when the workbook is installed as an add-in.

Private Sub Workbook_AddinInstall() 
 With Application.Commandbars("Standard").Controls.Add 
 .Caption = "The AddIn's menu item" 
 .OnAction = "'ThisAddin.xls'!Amacro" 
 End With End Sub 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.