I like to nest macros inside each other to make a very long code more manageable, but occasionally I have a situation in which I want to end the parent macro if certain errors occur in one of the child macros. Sometimes the child macro in question is 2 levels down as in this example:
Is there something I can put in "OpenOneBook" that will shut down the "AddCustomers" macro?
Set cel = Columns("A").Find(What:=[Q1], after:=Cells(1, 1), LookIn:=xlValues)
Dim wb As String
wb = [Q1] & " " & ActiveSheet.[annum] & " " & "Week " & [F1] & "_2BCoded.xls"
On Error GoTo here
Workbooks.Open Filename:=Left(ThisWorkbook.Path, Len(ThisWorkbook.Path) - 11) & [Q1] & "\3_Working Files\2BCoded\" & wb
MsgBox "This workbook has not been created yet, or has been renamed."