Record line number in macro where error occurs

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.
 
S

Spike

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.
 
B

Bernie Deitrick

Spike,

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

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top