Controls Property

This property is a collection whose elements represent each control on a form.

Syntax

object.Controls(index)

Parameters

object
Object expression that evaluates to a Form object.
index
Integer with a range from 0 to the number of controls –1.

Remarks

The Controls collection enumerates loaded controls on a form and is useful for iterating through them. The Controls collection identifies an intrinsic form-level variable named Controls. If you omit the optional object placeholder, you must include the Controls keyword. However, if you include object, you can omit the Controls keyword.