In my procedure if an error occurs I send to Errortrap.
During execution, the user might reply "No" when asked to replace a file when saving. This generates a 1004 error which is picked up in line 2 below. However, line 3 then causes a Runtime error 9 - subscript out of range error. I know that this line works fine elsewhere to transfer to the Create or Edit a Quote sheet.
Errortrap:
If Err.Number = 1004 Then
Sheets("Create or Edit a Quote").Activate
Endif
Exit Sub
Can anyone help out as to why it is not working here?
Thanks,
Mike
During execution, the user might reply "No" when asked to replace a file when saving. This generates a 1004 error which is picked up in line 2 below. However, line 3 then causes a Runtime error 9 - subscript out of range error. I know that this line works fine elsewhere to transfer to the Create or Edit a Quote sheet.
Errortrap:
If Err.Number = 1004 Then
Sheets("Create or Edit a Quote").Activate
Endif
Exit Sub
Can anyone help out as to why it is not working here?
Thanks,
Mike