Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Is Form Loaded?


Message #1 by avance@c... on Fri, 30 Mar 2001 14:17:57 +0100
Public Function IsFormLoaded(frmName As String) As
Boolean
Dim frm As Form
    For Each frm In Forms
        If frm.Name = Trim$(frmName) Then
            IsFormLoaded = True
            Exit Function
        End If
    Next
IsFormLoaded = False
End Function

--- John Walborn <JWalborn@m...> wrote:
> Be careful with this, though, because simply
> unloading a form does NOT set
> it to Nothing...
> 
> To force a form to unload completely and thus be
> "Nothing", use the
> following:
> 
> Unload frmMyForm
> Set frmMyForm = Nothing
> 
> Also note that the "Me" keyword WILL NOT WORK within
> the Set = Nothing
> statement.
> 
> -----Original Message-----
> From: Tim Mccurdy [mailto:tmccurdy@c...]
> Sent: Friday, March 30, 2001 8:18 AM
> To: professional vb
> Subject: [pro_vb] RE: Is Form Loaded?
> 
> 
> If (Not frmTest Is Nothing) Then
> 	.....
> 
> -----Original Message-----
> From: avance@c... [mailto:avance@c...]
> Sent: Friday, March 30, 2001 8:18 AM
> To: professional vb
> Subject: [pro_vb] Is Form Loaded?
> 
> 
> How would I write code to check if a form is loaded
> or not?
> 
> Alastair
> 
> 

  Return to Index