Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing all windows using control box exit

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have a problem where by the application is not unloaded correctly when the control box exit button is pressed on the top tool bar. I need to keep the control box active so I can minimise. How can I close all active windows when this button is pressed.
Thanks
John Macleod
 
Try this

dim max as integer
dim i as integer
max = Forms.Count - 1
For i=max to 0 step -1
If Forms(i).Name <> &quot;frmMain&quot; Then
Unload Forms(i)
End If
Next

Herman :-Q
 
Not sure of the question, but the lastpost will do it, if its where you place it, you need to trap the main forms query unload event to make sure you are getting the top right hand close button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top