Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default confirmation and close

Sorry please amend :
If MsgBox("Are you sure you want to do this?", vbYesNo + vbQuestion, "Please
confirm") = vbNo Then Exit Sub

Pascal

"papou" a écrit dans le message de
...
Hi Andy
If MsgBox("Are you sure you want to do this?", vbYesNo + vbsuestion,

"Please
confirm") = vbNo Then Exit Sub
MsgBox "not cancelled"
'do your stuff

To prevent closing your form add this into the form's code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode < 1 Then Cancel = 1
End Sub

HTH
Cordially
Pascal

"bigandyt " a écrit dans le
message de ...
i was wondering if it is possible to insert vb code in a macro that will
display to the user "are u sure u want to do this" or along those
lines, if yes the rest of the macro is executed else the macro stops.


also i want to get rid of the 'X' at the top right of my form so the
user cannot close the form is this possible

any help would be appreciated

Andy


---
Message posted from http://www.ExcelForum.com/





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
bookkeeping-payment confirmation puiuluipui Excel Discussion (Misc queries) 7 September 16th 09 08:10 PM
Confirmation Security Babs in Ohio Excel Worksheet Functions 0 April 15th 09 06:20 PM
A question about the confirmation loveflying_best[_2_] Excel Discussion (Misc queries) 1 October 8th 07 12:42 PM
Confirmation ID provided? chevy New Users to Excel 2 April 15th 06 06:22 PM
Getting rid of confirmation boxes DandruffKid New Users to Excel 2 March 28th 05 11:05 AM


All times are GMT +1. The time now is 09:26 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"