Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close UserForm despite Exit Event
Hi all,
I am stuck with a userform I cannot close because of the exit event, which prevents user from "forgetting" to input data. Thanks for your hints Cheers Carim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close UserForm despite Exit Event
Try inputting the required data, then if it is coded correctly it should let
you exit. If that fails, try doing Ctrl and hitting the Break key. -- Regards, Tom Ogilvy "Carim" wrote in message oups.com... Hi all, I am stuck with a userform I cannot close because of the exit event, which prevents user from "forgetting" to input data. Thanks for your hints Cheers Carim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close UserForm despite Exit Event
The answer my friend ...
See below, George Clark has a brilliant solution : http://groups-beta.google.com/group/...a572c7c84 309 I Love this NG Cheers |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close UserForm despite Exit Event
Maybe something like this will give you a hint:
Option Explicit Dim BlkProc As Boolean Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If BlkProc = True Then Exit Sub If IsNumeric(Me.TextBox1.Value) Then MsgBox "nope" Cancel = True End If End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then BlkProc = True End If End Sub (it was a reply to a similar question--how to stop the validation msgbox from showing up when the user hit the X buttton.) Carim wrote: Hi all, I am stuck with a userform I cannot close because of the exit event, which prevents user from "forgetting" to input data. Thanks for your hints Cheers Carim -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close UserForm despite Exit Event
Dave,
Thanks a lot for your help. It is the solution I was looking for. Cheers Carim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Close vs. Exit in 2007 | Excel Discussion (Misc queries) | |||
Exit Event | Excel Programming | |||
Close and Exit Excel | Excel Programming | |||
Close and Exit Excel | Excel Programming | |||
Close or Exit application | Excel Programming |