Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() JJD, Have your On Error GoTo statement point to a specific line in th sub where you are trying to trap the error, such as: On Error GoTo errhndlr Then at the bottom of your sub put the following Exit Sub errhndlr: ' - Then put whatever code you want to run if the error occurs ' - The IF statement in your case ' - IF your condition is true then use END to quit the entire macro Be sure to have Exit Sub before your error handler so it will not ru unless an error occurs. Also make sure your errhndlr: line starts all the way to the left (i not indented) and that it ends with the colon : HT -- bhofset ----------------------------------------------------------------------- bhofsetz's Profile: http://www.excelforum.com/member.php...fo&userid=1880 View this thread: http://www.excelforum.com/showthread.php?threadid=38134 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
On Error Goto ignored | Excel Programming | |||
On Error Goto doesn't goto | Excel Programming | |||
On Error Goto doesn't goto | Excel Programming | |||
On Error GoTo | Excel Programming | |||
On error goto 0? | Excel Programming |