Is There A Way To Paste Standard Error Trapping Code

  • Thread starter John O. Graybill
  • Start date
J

John O. Graybill

While using the Visual Basic code editor, is there a way to paste my
standard error trapping code into a new (i.e., blank) sub procedure?
I say "my" because I have my own favorite way of trapping and
displaying trapped error messages.

Standard error trapping code gets created when one uses the Control
Wizard and I wonder if there is a way to create, or find, a similar
tool that recognizes what event procedure I am in, grabs the event-
name, and produces (i.e., pastes in) the "On Error GoTo . . ." and
other error trapping code so I don't have to type it into every new
sub procedure -- Any thoughts?
 
G

Guest

Hi John,

Check out this freeware:
http://www.mztools.com/index.htm

You get icons in your vba editor that allows you to, at the click of a
button, add various pre-written code blocks (for example: error handler). It
comes with some default code already I think, but it's easy to look at and
modify.

CW
 

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