|
-
Feb 7th, 2000, 08:39 AM
#1
Thread Starter
Hyperactive Member
Does an MDI Parent form have a collection of all of it's Child forms? I mean, like the way a form has a collection of all of the controls on it. Does an MDI Parent form have something like that? And if so, how do you use it?
------------------
Ryan
-
Feb 7th, 2000, 05:08 PM
#2
New Member
Uh, sortof...You can use the Forms collection which will return ALL the loaded forms and just skip the MDIForm.
Code:
For Each Form In Forms
'replace with correct MDIForm name
If Form.Name <> MDIForm1.Name Then
MsgBox Form.Name
End If
Next
If your MDIForm is named MyMainForm then you can use:
If Form.Name <> MyMainForm.Name Then
Or
If Form.Name <> "MyMainForm" Then
Hope this helps!
-
Feb 7th, 2000, 11:45 PM
#3
Just a small correction. Not every form in the Forms collection is necessary a MDIChild form.
Dim frm As Form
On Error Resume Next
For Each frm In Forms
If frm.MDIChild Then
MsgBox frm.Name
End If
Next
Good luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
[This message has been edited by Joacim Andersson (edited 02-08-2000).]
-
Feb 9th, 2000, 06:32 AM
#4
Thread Starter
Hyperactive Member
Ok, great thank guys. This is exactly what I was looking for.
------------------
Ryan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|