Hello,
What I am trying to do is that when excel encounters an error i would like it to move to another step and so on. I tried using the on error goto and resume next but it was not working the way I want it to. Thanks for your help in advance.
What I am trying to do is that when excel encounters an error i would like it to move to another step and so on. I tried using the on error goto and resume next but it was not working the way I want it to. Thanks for your help in advance.
Code:
Sub test()
'step1
'block of code
'if error occurs in the line above than _
skip the lines below and goto STEP2.
'mulitiple lines of code
'mulitiple lines of code
'mulitiple lines of code
'step2
'block of code
'if error occurs in the line above than _
skip the lines below and goto STEP3.
'mulitiple lines of code
'mulitiple lines of code
'mulitiple lines of code
'step3
'block of code
'if error occurs in the line above than _
skip the lines below and goto STEP4.
'mulitiple lines of code
'mulitiple lines of code
'mulitiple lines of code
'step4
'block of code
'if error occurs in the line above than _
skip the lines below and goto STEP5.
'mulitiple lines of code
'mulitiple lines of code
'mulitiple lines of code
'step5
'block of code
'if error occurs in the line above than _
skip the lines below.
'mulitiple lines of code
'mulitiple lines of code
'mulitiple lines of code
End Sub