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
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
The answer my friend ...
See below, George Clark has a brilliant solution :
http://groups-beta.google.com/group/...c0a572c7c84309
I Love this NG
Cheers
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" <carim.fam@wanadoo.fr> wrote in message
news:1116266365.786148.194350@f14g2000cwb.googlegroups.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
>
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
Dave,
Thanks a lot for your help.
It is the solution I was looking for.
Cheers
Carim
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks