View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Error Handling question

On error goto ErrorHand '<-- remove colon here
code 1...
code 1...
code 1...
On error goto 0

Exit Sub
ErrorHand: '<-- keep colon here
code...

--
Regards,
Tom Ogilvy


"J@Y" wrote:

I have this set of code:

On error goto ErrorHand:
code 1...
code 1...
code 1...
On error goto 0

ErrorHand:
code...

Somewhere within the Code 1, there is a type mismatch error, but the program
doesn't go to ErrorHand, instead it goes debug window. Am I doing something
wrong?