|
-
March 6th, 2002, 09:25 AM
#2
Re: how to close all forms when closing the application?
I'm not to sure what you want to do here!.
Once the main Form is unloaded all other forms follow suit. Try using your code in the main Forms Unload QueryUnload Event
private Sub Form_QueryUnload(Cancel as Integer, UnloadMode as Integer)
Dim i as Integer
for i = 0 to Forms.Count - 1
If Forms(i).Name <> me.name then
'close form
unload (Forms(i))'(i)?? End If
next i
End Sub
Andrew Lennon (Berlitz)
Automation Dev Engineer
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
|