![]() |
show form yes/no... if anything other than no, close appl.
Hi,
I have a 'disclaimer' form in my application. I would like to: - if anything other then the "OK" button is clicked (the 'X') there should be a message: "please read the disclaimer or quit (form with ok (return to 'disclaimer form' or quit (quit application) Does anybody have the code for this please? Thanks, Pierre -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200511/1 |
show form yes/no... if anything other than no, close appl.
You might block closing via the "x" like this:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then MsgBox "Please click OK or Cancel" Cancel = True End If End Sub -- Jim "Pierre via OfficeKB.com" <u13950@uwe wrote in message news:56b9d4a46da0d@uwe... | Hi, | | I have a 'disclaimer' form in my application. | I would like to: | | - if anything other then the "OK" button is clicked (the 'X') there should | be a message: | | "please read the disclaimer or quit (form with ok (return to 'disclaimer | form' or quit (quit application) | | Does anybody have the code for this please? | Thanks, | Pierre | | | -- | Message posted via OfficeKB.com | http://www.officekb.com/Uwe/Forums.a...mming/200511/1 |
show form yes/no... if anything other than no, close appl.
Thanks Jim.
Works fine for me ! Pierre Jim Rech wrote: You might block closing via the "x" like this: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 0 Then MsgBox "Please click OK or Cancel" Cancel = True End If End Sub | Hi, | [quoted text clipped - 10 lines] | Thanks, | Pierre -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200511/1 |
All times are GMT +1. The time now is 07:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com