+ Reply to Thread
Results 1 to 5 of 5

Close UserForm despite Exit Event

Hybrid View

  1. #1
    Carim
    Guest

    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. #2
    Carim
    Guest

    Re: Close UserForm despite Exit Event

    The answer my friend ...

    See below, George Clark has a brilliant solution :
    http://groups-beta.google.com/group/...c0a572c7c84309

    I Love this NG

    Cheers


  3. #3
    Tom Ogilvy
    Guest

    Re: 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" <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
    >




  4. #4
    Dave Peterson
    Guest

    Re: 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. #5
    Carim
    Guest

    Re: Close UserForm despite Exit Event

    Dave,

    Thanks a lot for your help.
    It is the solution I was looking for.
    Cheers
    Carim


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1