Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good morning!
I find myself without my VBA bible, it is at work and I am at home....in it was a method to desenitize the "X" found on various boxes that can be build via VBA. To my horror I have found several field type people (read that as users) who are using this 'X' and blowing up my VBA utility. Can some one offer the fix for this that I can't quite remember and put me out of my misery? Thanks Wayne |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might be too late for you, but here is code to stop the user from
closing with the "X". This is for a userform; you didn't mention if that was the case or not. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True MsgBox "Please use the OK button." 'Change message to suite. End If End Sub Alan " wrote: Good morning! I find myself without my VBA bible, it is at work and I am at home....in it was a method to desenitize the "X" found on various boxes that can be build via VBA. To my horror I have found several field type people (read that as users) who are using this 'X' and blowing up my VBA utility. Can some one offer the fix for this that I can't quite remember and put me out of my misery? Thanks Wayne |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you've never thought of it, but this is a bad way to disable the red
X. Why chastise your user for using the red X to dismiss the form? The technique I posted, and the approach Rick mentioned, both cause the red X click to actually execute a click on the button you want the user to press to dismiss the dialog. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Alan" wrote in message ... This might be too late for you, but here is code to stop the user from closing with the "X". This is for a userform; you didn't mention if that was the case or not. Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True MsgBox "Please use the OK button." 'Change message to suite. End If End Sub Alan " wrote: Good morning! I find myself without my VBA bible, it is at work and I am at home....in it was a method to desenitize the "X" found on various boxes that can be build via VBA. To my horror I have found several field type people (read that as users) who are using this 'X' and blowing up my VBA utility. Can some one offer the fix for this that I can't quite remember and put me out of my misery? Thanks Wayne |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
Highlight / "Selection" of AutoShape Text (Like SelStart for TextBoxes) | Excel Programming |