Function IsLoaded(ByVal MyFormName As String) As Integer ' Returns True if the specified form is loaded. Dim I IsLoaded = False For I = 0 To Forms.Count - 1 If Forms(I).FormName = MyFormName Then IsLoaded = True Exit Function ' Quit function once form has been found. End If Next End Function