Controls                                                                                                   Function

 

CONTROLS(index as integer).propertyName

 

Description

References a property or method of an object by its index position on a form. Controls(0) is the title bar of the form(if it has one). The objects of the form are indexed sequentially. Controls can be used to reference any property or event that is applicable to the object. The Type property is handy to determine the type of an object in the Control array.

 

Example

i=Button1004.index

controls(i).text="New button name"