a_norton
asked on
Run time error on DirectPrecedents.Select
Hello
I am struggling with my error handling in VBA (please refer below for an extract of code).
Worksheet.Cells.Select
On Error GoTo NoPrecedentCells
Selection.DirectPrecedents .Select
NoPrecedentCells:
End Sub
Regardless of the "On Error" command, a run-time error 1004 (No cells were found) arises.
Can you assist in anyway.
Thanks and regards
Aidan
I am struggling with my error handling in VBA (please refer below for an extract of code).
Worksheet.Cells.Select
On Error GoTo NoPrecedentCells
Selection.DirectPrecedents
NoPrecedentCells:
End Sub
Regardless of the "On Error" command, a run-time error 1004 (No cells were found) arises.
Can you assist in anyway.
Thanks and regards
Aidan
ASKER
Hello,
My Error Trapping Status appears to be set to Break on Unhandled Errors...
Is this correct? On this setting the problem does however persist :(
My Error Trapping Status appears to be set to Break on Unhandled Errors...
Is this correct? On this setting the problem does however persist :(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks you so much!
Have you verified in the VBE Options/ General your Error Trapping Status
Break on All errors OR Break in Class Module OR Break on Unhandled Errors ( the right one)
Regards