Please review the site disclaimer before downloading or using content found on this site
Written by: Steve Gray 7/12/2010 10:44 AM
This code will open a form once, but only once. If the form is already open it will bring that window to the top
Sub openform(ByVal frm As Form) Dim f As Form For Each f In Me.MdiChildren If f.Name = frm.Name Then 'the form is already open Exit Sub End If Next frm.MdiParent = Me frm.Show() End Sub
Sub openform(ByVal frm As Form)
Dim f As Form
For Each f In Me.MdiChildren
If f.Name = frm.Name Then
'the form is already open
Exit Sub
End If
Next
frm.MdiParent = Me
frm.Show()
End Sub
0 comment(s) so far...