Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 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" .... -- Vikxce ----------------------------------------------------------------------- Vikxcel's Profile: http://www.excelforum.com/member.php...fo&userid=1860 View this thread: http://www.excelforum.com/showthread.php?threadid=47771 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... Use Stop On Error Goto quit_it 'code quit_it: Stop -- HTH RP (remove nothere from the email address if mailing direct) "Vikxcel" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop and show error | Excel Discussion (Misc queries) | |||
#NAME? - is there a way to stop this error message? | Excel Discussion (Misc queries) | |||
Stop error message | Excel Discussion (Misc queries) | |||
Stop Error Message | Excel Programming | |||
stop error message | Excel Programming |