RemoveControl Method (AForm)

Version 5

Removes a control of given name or index from a form.

Syntax

Object.RemoveControl (vNameOrIndex)

The RemoveControl method syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

vNameOrIndex

Val Varient

Control's name or index to delete

Comments

If control name or index is invalid, then it will return False.

Example

The following statement deletes a control named "pnlMiscButtons" and another control (with the index of 4) from the current form:

 

RemoveControl("pnlMiscButtons")

RemoveControl(4)

Applies to

AForm

See Also

InsertControl