2 error goto handlers in one sub
hi again i need your help please.
I want to have 2 error goto handlers in one sub but if i use a code like this returns that "Resume DoCalc:" expected end of statement what i have to do?
OnErrorGoTo ErrHandler1
IfNot Exists(BaseDirectory +"\ARCHIVE")Then _
MkDir BaseDirectory +"\ARCHIVE"
DoCalc:
OnErrorGoTo Errhandler2
intvalue1 =12
intvalue2 =0
intvalue3 = intvalue1 / intvalue
ExitSub
ErrHandler1:
Call MsgBox("Error making directory - "& Err.Number & vbCrLf & Err.Description, vbExclamation, App.Title)
Resume DoCalc:
Errhandler2:
Call MsgBox("Error doing arithmetic - "& Err.Number & vbCrLf & Err.Description, vbExclamation, App.Title)
This post has been edited 1 times, last edit by "fomaxrge" (Sep 10th 2012, 1:32pm)