Record line number in macro where error occurs

  • Thread starter Thread starter Spike
  • Start date Start date
S

Spike

When trapping errors, is it possible to record the line in the macro where
the error occurred so in the Error Trapping routine one can note this line to
assist in finding the error.

I copy error details to an Error Log so it would be handy to have the line
in the macro where the error trapping routine was triggered.
 
Thanks for tha. So we have to number the rows of the macro, which is a shame
as makes it look scrappy but then if that is it so be it.
 
Spike,

For development work, in the VBE: Tools / Options "General" tab, check "Break on all errors"

HTH,
Bernie
MS Excel MVP
 
Back
Top