RemoveControl event

Occurs when a control is deleted from the container.

Syntax

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

For all other controls
Private Subobject _RemoveControl(ctrlAs Control)

The RemoveControl event syntax has these parts:

Part Description
object Required. A valid object name.
index Required. The index of the page in a MultiPage that contained the deleted control.
ctrl Required. The deleted control.

Remarks

This event occurs when a control is deleted from the form, not when a control is unloaded due to a form being closed.

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.