Occurs when a control is deleted from the container.

Syntax

For MultiPage
Private Sub object_RemoveControl( index As Long, ctrl As Control)

For all other controls
Private Sub object_RemoveControl( ctrl As 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.