편집

다음을 통해 공유


AddControl event

Occurs when a control is inserted onto a form, a Frame, or a Page of a MultiPage.

Syntax

For Frame
Private Subobject _AddControl( )

For MultiPage
Private Subobject _AddControl(indexAs Long, ctrlAs Control)

The AddControl event syntax has these parts:

Part Description
object Required. A valid object.
index Required. The index of the Page that will contain the new control.
ctrl Required. The control to be added.

Remarks

The AddControl event occurs when a control is added at run time. This event is not initiated when you add a control at design time, nor is it initiated when a form is initially loaded and displayed at run time.

The default action of this event is to add a control to the specified form, Frame, or MultiPage.

The Add method initiates the AddControl event.

See also

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.