Check if a user form is loaded


Function IsUserFormLoaded(ByVal UFName As String) As Boolean 
    Dim UForm As Object 
     
    IsUserFormLoaded = False 
    For Each UForm In VBA.UserForms 
        If UForm.Name = UFName Then 
            IsUserFormLoaded = True 
            Exit For 
        End If 
    Next 
End Function 'IsUserFormLoaded