Hello,
I've a module with the following code:
This is used when a user clicks on a button at the Startup form (MDI form), so that when we open a form, we should close any other form that was left open.
My problem is that this process is a little slow because I've several forms in my program and this function as to check all of them.
Is there another way to do it?
Thanks in advance.
João Pinto
I've a module with the following code:
Code:
Public Sub close_form(option As String)
Dim frm As Form
For Each frm In Forms
If (frm.Name <> option) And (frm.Name <> "Startup") Then
Unload frm
End If
Next
End Sub
This is used when a user clicks on a button at the Startup form (MDI form), so that when we open a form, we should close any other form that was left open.
My problem is that this process is a little slow because I've several forms in my program and this function as to check all of them.
Is there another way to do it?
Thanks in advance.
João Pinto