|
|
Title | See if a form with a given name is loaded |
Keywords | form loaded, form type |
Categories | Controls |
|
|
The reason this is necessary is that you cannot easily look at the form itself. If you look at the form or its properties, that tends to load the form if it is not already loaded. Looking in the Forms collection does not involve the form in any way if it is not already loaded.
The IsLoaded function searches the Forms collection for a form with a given name.
|
|
' Return True if a form is loaded.
Public Function IsLoaded(ByVal form_name As String) As _
Boolean
Dim frm As Form
IsLoaded = False
For Each frm In Forms
If frm.Name = form_name Then
IsLoaded = True
Exit For
End If
Next frm
End Function
|
|
|
|
|
|