Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close User Form Gazz_85[_2_] Excel Discussion (Misc queries) 1 July 8th 09 10:38 AM
Form Close Button ceemo[_37_] Excel Programming 3 October 12th 05 10:39 PM
Close form instead of hide skuzapo Excel Programming 2 September 26th 05 11:24 PM
Help! Animated gif-image in form does not show animation when form loaded JoCa Excel Programming 4 September 23rd 04 07:43 PM
Close Form with VBA William C. Smith Excel Programming 3 September 2nd 03 05:28 AM


All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"