See Also Properties Example
A collection The collection includes the application's MDI form, MDI child forms, and non-MDI forms . The Forms collection has a single property, Count , that specifies the number of elements in the collection. whose elements represent each loaded form in an application.
Forms(index)[.control][.property][ = setting ]
In the preceding syntax, the range of index is 0 to Forms.Count-1. The Forms collection is useful for iterating through all loaded forms in an application. Note that Forms is a keyword, but not a reserved word. It identifies an intrinsic global variable named Forms. You can use Forms(index) as an argument to a function with a parameter of type Form.
Chapter 8, "Objects and Instances"
Forms Collection Example
The OBJECTS.MAK file referred to in Chapter 8 of the Programmer's Guide includes the following procedure to fill a list box with the captions of all the currently loaded forms:
Sub Form_Activate ()
Dim I ' Declare variable.
' Refill list (in case an instance was added or removed).
lstForms.Clear ' Clear list box.
For I = 0 To Forms.Count - 1