Default Error Check

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've noticed when I use the wizard to add a control on a form, for example a
delete button, the wizard automatically generates the code behind the button
including error checking. On other occasions when I select from the dropdown
an event in VBA, for example Form Load, no error check code is automatically
generated.

Similar to how the wizard does this, is there a template somewhere that I
could modify to have error check code automatically generated when selecting
an event?
 
Nope. But you can copy & paste the code created by the Wizard. Just be
certain to change the LABELS (eg. cmdButton1_Error to myButton_Error).
As you progress as a developer, you'll also see different ways to handle
different types of errors.
 
I've noticed when I use the wizard to add a control on a form, for example a
delete button, the wizard automatically generates the code behind the button
including error checking. On other occasions when I select from the dropdown
an event in VBA, for example Form Load, no error check code is automatically
generated.

Similar to how the wizard does this, is there a template somewhere that I
could modify to have error check code automatically generated when selecting
an event?

Try MZ Tools: www.mztools.com

They make an add-in that's pretty slick. Not only does it have an error
handling template but you can add other code templates, as well.

Regards,
RD
 
Back
Top