Properties Property (Properties Collection) Example

The following example enumerates the Properties collection of the open Orders form and prints the name of each property and its value.

Sub CurrentPropSettings()
    Dim frm As Object, prp As Integer
    Set frm = Application.Forms("Orders")
    ' Enumerate Properties collection.
    For prp = 0 To frm.Properties.Count - 1
        ' Print name of property and value.
        Debug.Print frm.Properties(prp).Name & " = " _
            & frm.Properties(prp).Value
    Next prp
End Sub