Referencing the line that caused an error

  • Thread starter Thread starter Nelson
  • Start date Start date
N

Nelson

I am familiar with using line numbers and Erl but is there a way to
determine which line caused an error without numbering the lines? It seems
that there should be a way since VBA keeps track of that for resume and
resume next.

TIA
Nelson
 
No. It does not expose these for your.

The simplest practice is to move out into a little wrapper function anthing
that is likely to cause an error. IMHO, that's better than using On Error
Resume Next and then testing Err.Number.
 
Back
Top