Code to ensure that all open windows are closed when the main program exits.
Code to ensure that all open windows are closed when the main program exits.
Rate Code to ensure that all open windows are closed when the main program exits.
(2(2 Vote))
Private Sub Form_Unload(Cancel As Integer)
' placed in the main form's unload procedure
For Each Form In Forms
If Form.Visible = True Then
Unload Form
End If
Next
End Sub
Code to ensure that all open windows are closed when the main program exits. Comments
No comments yet — be the first to post one!
Post a Comment