Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error processing
Hi guys;
I have On Error GoTo routine in a module. in the error-handling routine, I have On Error GoTo 0 The first time the error is hit; process goes to "routine", correctly. The second time, however, process does not jump. Err.number is set. Why? Also, is there a way to test for an object containing Nothing ( not valid reference)? Thanks; Jerry |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error processing
An error handler can not have an error handler in it. As for testing an
object that is do-able... Dim wks as worksheet if wks is nothing then msgbox "No sheet" set wks = sheet1 if wks is nothing then msgbox "Still no sheet" -- HTH... Jim Thomlinson "Jerry" wrote: Hi guys; I have On Error GoTo routine in a module. in the error-handling routine, I have On Error GoTo 0 The first time the error is hit; process goes to "routine", correctly. The second time, however, process does not jump. Err.number is set. Why? Also, is there a way to test for an object containing Nothing ( not valid reference)? Thanks; Jerry |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error processing
When an error occurs and you have an On Error Goto statement, VBA
is operating in Error mode, and no other errors can be trapped until you exit Error mode. You exit error mode by exiting the procedure or by using a Resume or Resume Next statement in the error handling code. An error handling block of code cannot have an On Error statement in it. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jerry" wrote in message oups.com... Hi guys; I have On Error GoTo routine in a module. in the error-handling routine, I have On Error GoTo 0 The first time the error is hit; process goes to "routine", correctly. The second time, however, process does not jump. Err.number is set. Why? Also, is there a way to test for an object containing Nothing ( not valid reference)? Thanks; Jerry |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error processing
Thank Jim "Is Nothing" is not nothing. That worked and the error
handler was removed. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Processing Data | Excel Worksheet Functions | |||
data processing | Excel Discussion (Misc queries) | |||
Automatic error processing? | Excel Discussion (Misc queries) | |||
Error processing the dimension '[Microsoft][ODBC dBase Driver] To. | Excel Discussion (Misc queries) | |||
ComboBox processing error | Excel Programming |