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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close on UI Component Does not Close Parent Form

Status
Not open for further replies.

c91364

Programmer
May 19, 2005
7
US
Is there a way to trap the OnClose Event for a UI Component? Currently when I click the close button, the parent form remains open and contains the following text:

"The UI is closed.

Before reopening the UI, you need to close its host window (or remove the UI from its host window).
 
Private Sub uiAP1100_OnUIAppClosed()
Me.UIAP1100.CloseUIApp
Me.Close
End Sub


Jay Converse
IT Director
Systemlink, Inc.
 
For some reason there isn't a Close method for the form. The OnUIAppClosed() is being executed when I click the Close button, but I receive the following error:

"Compile error:
Method or data member not found.
 
It's not the form, it's the UI on the form.

Jay Converse
IT Director
Systemlink, Inc.
 
But, when I look at the available methods for my form (i.e., ME.) Close is not an option.
 
I wasn't able to use .Close, but "End" worked for me.

Thank you.
 
Starting with 5.3, using "End" statements in a form of a VBA macro will cause the error "Macro has terminated for unknown reasons" when you run it.

Jay Converse
IT Director
Systemlink, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top