Use the form object variable to point at each form in the Forms collection : Forms « Forms « VBA / Excel / Access / Word






Use the form object variable to point at each form in the Forms collection

 
Sub IterateOpenForms()
    Dim frm As Form
    
    For Each frm In Forms
        'Print the name of the referenced form to the Immediate window
        Debug.Print frm.Name
    Next frm
End Sub

 








Related examples in the same category

1.Loop through the documents in Forms