I have at main.form a hidden dummy label, on event when it changes I jump to popup(forced)
Its caption get sa value if in a sub is a error like:
Private sub Something
on error goto Report
Thelabel.caption= " error n# " & str$(err) & " in line " & str$(erl) & "in submodule: & ??? ????????? now here i would like to add the name of this sub???
so the label will show " error n# x in line x in module Someting
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.