ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   chane what 'x' button on top right of the form does (https://www.excelbanter.com/excel-programming/431874-chane-what-x-button-top-right-form-does.html)

Sam

chane what 'x' button on top right of the form does
 
How can I code the 'x' button located on the top right of the form such that
it quits the application? or make it do something that I want.

Thanks in advance

John

chane what 'x' button on top right of the form does
 
paste behaind form:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

If CloseMode = 0 Then

'do something

MsgBox "You Pressed X"

End If

End Sub
--
jb


"sam" wrote:

How can I code the 'x' button located on the top right of the form such that
it quits the application? or make it do something that I want.

Thanks in advance



All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com