如何判断子窗体已经显示

解决方案 »

  1.   

    if frm.visible=true then
    end if
      

  2.   

    用这个函数,参数是窗体的名字Public Function IsFormLoaded(strForm As String) As Boolean
        Dim frm As Form
        
        IsFormLoaded = False
        For Each frm In Forms
            If frm.Name = strForm Then
                IsFormLoaded = True
                Exit Function
            End If
        Next
    End Function