RemoveControl Method (AForm) |
Version 5 |
Removes a control of given name or index from a form.
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 |
If control name or index is invalid, then it will return False.
The following statement deletes a control named "pnlMiscButtons" and another control (with the index of 4) from the current form:
RemoveControl("pnlMiscButtons")
RemoveControl(4)