-
This is probably an easy question but I was wondering whether this code would pick up both errors
Code:
Private sub Mysub()
Components_Filepath = Workbooks(Master_Workbook).Sheets("constants").Range("E5").Value
On Error GoTo Master_NotFound
Astr = Application.Workbooks(Master_Workbook).Path & "\[" & _
Application.Workbooks(Master_Workbook).Name & "]"
On Error GoTo No_Components
Workbooks.Open FileName:=Components_Filepath, _
UpdateLinks:=0, Editable:=True
'more code goes here
exit sub
No_Components:
'do something here
Resume
Master_NotFound:
'do something here
Resume
End sub
So I suppose my question is can you put more than one On Error GoTo statement within one procedure
Cheers for any help
Steve
-
Yes you can. And yes that should work.
-
Thanks