+ Reply to Thread
Results 1 to 3 of 3

On Error STOP!!!

Hybrid View

Vikxcel On Error STOP!!! 10-19-2005, 06:51 PM
Guest Re: On Error STOP!!! 10-19-2005, 08:05 PM
Guest Re: On Error STOP!!! 10-19-2005, 09:05 PM
  1. #1
    Registered User
    Join Date
    01-18-2005
    Posts
    24

    On Error STOP!!!

    Ok, so I searched and I need your help again guys.
    How do I stop on Error? just quit, maybe drop a msgbox in there with a reason, but just stop right after it, don't do anything in the code???

    Thank you all for your help.

    So:
    On Error ????
    MsgBox "Command Terminated"
    ....?

  2. #2
    Bob Phillips
    Guest

    Re: On Error STOP!!!

    Use Stop

    On Error Goto quit_it
    'code


    quit_it:
    Stop

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Vikxcel" <Vikxcel.1x696d_1129763129.6127@excelforum-nospam.com> wrote in
    message news:Vikxcel.1x696d_1129763129.6127@excelforum-nospam.com...
    >
    > Ok, so I searched and I need your help again guys.
    > How do I stop on Error? just quit, maybe drop a msgbox in there with a
    > reason, but just stop right after it, don't do anything in the code???
    >
    > Thank you all for your help.
    >
    > So:
    > On Error ????
    > MsgBox "Command Terminated"
    > ...?
    >
    >
    > --
    > Vikxcel
    > ------------------------------------------------------------------------
    > Vikxcel's Profile:

    http://www.excelforum.com/member.php...o&userid=18607
    > View this thread: http://www.excelforum.com/showthread...hreadid=477714
    >




  3. #3
    Mike Fogleman
    Guest

    Re: On Error STOP!!!

    From VBA help:
    End Statement Example
    This example uses the End Statement to end code execution if the user enters
    an invalid password.

    Sub Form_Load
    Dim Password, Pword
    PassWord = "Swordfish"
    Pword = InputBox("Type in your password")
    If Pword <> PassWord Then
    MsgBox "Sorry, incorrect password"
    End
    End If
    End Sub
    Stop Statement Suspends execution.SyntaxStopRemarksYou can place Stop
    statements anywhere in procedures to suspend execution. Using the Stop
    statement is similar to setting a breakpoint in the code.The Stop statement
    suspends execution, but unlike End, it doesn't close any files or clear
    variables, unless it is in a compiled executable (.exe) file.Mike F

    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message
    news:%23FyTnJQ1FHA.4064@TK2MSFTNGP09.phx.gbl...
    > Use Stop
    >
    > On Error Goto quit_it
    > 'code
    >
    >
    > quit_it:
    > Stop
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Vikxcel" <Vikxcel.1x696d_1129763129.6127@excelforum-nospam.com> wrote in
    > message news:Vikxcel.1x696d_1129763129.6127@excelforum-nospam.com...
    >>
    >> Ok, so I searched and I need your help again guys.
    >> How do I stop on Error? just quit, maybe drop a msgbox in there with a
    >> reason, but just stop right after it, don't do anything in the code???
    >>
    >> Thank you all for your help.
    >>
    >> So:
    >> On Error ????
    >> MsgBox "Command Terminated"
    >> ...?
    >>
    >>
    >> --
    >> Vikxcel
    >> ------------------------------------------------------------------------
    >> Vikxcel's Profile:

    > http://www.excelforum.com/member.php...o&userid=18607
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=477714
    >>

    >
    >




+ 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