OnConnection Method

      Applies To

The environment calls this method loading the add-in. It connects the add-in to the extensibility object model.

Syntax

Sub OnConnect (ByVal Application As Object, ByVal Mode As vbext_ConnectMode, ByVal AddinInst As Object, Custom() As Variant)

This syntax has these parts:

Part Description
Application Required, the top-level extensibility object.
Mode Required, an enumerated type indicating the connection mode: ext_cm_AfterStartup, ext_cm_External, ext_cm_Startup, ext_cm_CommandLine.
AddinInst Required, a pointer to the add-in.
Custom Required Variant. Arguments to the add-in.

Remarks

Add-ins must implement this method.