This simple and ready to use function will return the number of forms loaded in a project.
Public Function FormCount() As Long
Dim frmForm As Form
For Each frmForm In Forms
FormCount = FormCount + 1
Next
End Function
To use, just call the function like this.
MsgBox "# of forms loaded: " & FormCount
0 comments:
Post a Comment