Polar Bear
03-05-2003, 04:26 PM
How can I write events for the Titlebar exit button?
I want to launch a procedure when it is clicked
ex.
Private Sub TitleBarExit_Click()
'Do whatever
End Sub
Private Sub ToolbarExit_Click()
Unload Me
End Sub
Polar Bear
03-05-2003, 04:50 PM
i need to know what is the name of the toolbar exit control
it's not ToolbarExit
maybe TitleBarExit? nope that doesn't work either
Volte
03-05-2003, 04:55 PM
Use the QueryUnload event.Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then
MsgBox "The 'X' button was clicked!"
End If
End Sub
i need to know what is the name of the toolbar exit control
it's not ToolbarExit
maybe TitleBarExit? nope that doesn't work either
Sorry, your use of the word ToolBar made me think you were talking about a ToolBar you had placed on the form, not the TitleBar of the form :-\