• VBA Error Handler Add-in (2000)

    Author
    Topic
    #402996

    I’m trying to standardize my error handling and procedure comments, and am trying to create templates for the VBA Code Commenter and VBA Error Handler Add-ins. The problem I’m having is that the Error Handler inserts an extra comment when it substitutes for the token, and I was wondering if there was an easy way to prevent this.

    For example, let’s say I have this line in the template:
    ‘ Created: $$D

    Using the Code Commenter, it produces a line of code like this:
    ‘ Created: 03-29-2004

    But when I use that same line in the Error Handler template, it produces this line of code:
    ‘ Created: 03-29-2004 ‘ErrorHandler: ErrorHandler:$$D=03-29-2004

    How do I suppress that extra comment?

    Viewing 1 reply thread
    Author
    Replies
    • #806654

      I have to admit that I looked briefly at these add-ins and returned gratefully to MZ-Tools, which is cheap and extremely flexible, plus it includes a bunch of other utilities and templates, not just error handling and code commenting templates.

      • #806765

        Charlotte,

        Thanks. I looked at the MZ-Tools website. Most of it seemed related to VB, especially related to managing a VB project, rather than VBA; or at least that was my impression. There did seem to be a couple of useful features in addition to the Comment and Error Handler add-ins, such as the ability to copy event procedures when copying a control, and the add-in to make creating message boxes easier. Any other features you’ve found really useful in Access?

        • #806828

          I rarely work in VB and use MZ-Tools exclusively in Access VBA. My favorite feature, besides the error handler template, is the Find, which shows you a treeview of the hits that allows you to click on one and go directly to that instance in the code. It also allows you to replace. I also like the fact that it has a tool to clear the immediate window and to close all code windows. I’ve used it for so long now, that I forget sometimes which features are not built into the VB IDE until I work on a machine without it.

          Oooh, I forgot one. There is a Review Source Code utility that presents you with a clickable treeview of all unused variables, procedures, parameters, etc., in your project, and highlights some other problems that the syntax checker doesn’t catch.

          • #806943

            That Review Source Code utility sounds really useful. Funny, as long as I’ve been involved in Access, I can’t recall hearing about MZ-Tools before! Thanks again.

            • #807080

              whisper We keep it a secret, Mark, and only tell special people about it. grin Welcome to the club.

            • #807081

              whisper We keep it a secret, Mark, and only tell special people about it. grin Welcome to the club.

            • #807096

              Hi Charlotte

              It’s not a secret any more and someone said all Loungers are special, thanks for the tip and great discovery.

              Questions respectfully asked:

              1. Once you get hooked on MZ-Tools what happen if Carlos goes under “Biking” in the promenade of Palma of Mallorca (Spain) at sunset?

              2. Are there other products that overlap functionality with MZ-Tools? If so what are they?

              Thanks, John

            • #807150

              Question 1: I have no clue. blackteeth

              Question 2: Some of the FMS tools have some overlap, and there are individual tools out there for one or two things, but I haven’t found anything else that was reasonably priced and anywhere near as useful.

              I also love VBACodePrint and VBCodePrint, which also come in a SQL flavor, I believe. It’s very handy to be able to print a single routine with the indents, colors, etc. from the code window.

            • #807151

              Question 1: I have no clue. blackteeth

              Question 2: Some of the FMS tools have some overlap, and there are individual tools out there for one or two things, but I haven’t found anything else that was reasonably priced and anywhere near as useful.

              I also love VBACodePrint and VBCodePrint, which also come in a SQL flavor, I believe. It’s very handy to be able to print a single routine with the indents, colors, etc. from the code window.

            • #807412

              Another utility I lke is Smart Indenter

              I’m still on Office2000 so I don’t know how it will work with later versions of Office.

            • #807584

              It works with XP, did not try yet with 2003

            • #807585

              It works with XP, did not try yet with 2003

            • #807413

              Another utility I lke is Smart Indenter

              I’m still on Office2000 so I don’t know how it will work with later versions of Office.

            • #807097

              Hi Charlotte

              It’s not a secret any more and someone said all Loungers are special, thanks for the tip and great discovery.

              Questions respectfully asked:

              1. Once you get hooked on MZ-Tools what happen if Carlos goes under “Biking” in the promenade of Palma of Mallorca (Spain) at sunset?

              2. Are there other products that overlap functionality with MZ-Tools? If so what are they?

              Thanks, John

            • #807102

              Well thanks for letting me in the club! blackteeth

            • #807103

              Well thanks for letting me in the club! blackteeth

          • #806944

            That Review Source Code utility sounds really useful. Funny, as long as I’ve been involved in Access, I can’t recall hearing about MZ-Tools before! Thanks again.

        • #806829

          I rarely work in VB and use MZ-Tools exclusively in Access VBA. My favorite feature, besides the error handler template, is the Find, which shows you a treeview of the hits that allows you to click on one and go directly to that instance in the code. It also allows you to replace. I also like the fact that it has a tool to clear the immediate window and to close all code windows. I’ve used it for so long now, that I forget sometimes which features are not built into the VB IDE until I work on a machine without it.

          Oooh, I forgot one. There is a Review Source Code utility that presents you with a clickable treeview of all unused variables, procedures, parameters, etc., in your project, and highlights some other problems that the syntax checker doesn’t catch.

        • #806889

          In addition to the comments by Charlotte, we often use the line numbering feature in conjunction with the error handling routines to record errors to an error log – makes it much easier to figure out where a specific error occurred after the fact.

          • #806945

            Line numbering always seems like such a throwback to the old days! But as you pointed out, it can be useful when passing info to a generic Error Reporting function. BTW, does utility renumber when you have to insert a chunk of code between existing lines? Or does it just try to number the new lines?

          • #806946

            Line numbering always seems like such a throwback to the old days! But as you pointed out, it can be useful when passing info to a generic Error Reporting function. BTW, does utility renumber when you have to insert a chunk of code between existing lines? Or does it just try to number the new lines?

        • #806890

          In addition to the comments by Charlotte, we often use the line numbering feature in conjunction with the error handling routines to record errors to an error log – makes it much easier to figure out where a specific error occurred after the fact.

        • #806895

          The Code Sorter is useful too. I try to end up with all procedures relating to a particular control together which the VBA IDE does not make easy!

          MZ-Tools is a salutary example to MS of how deficient their IDE is!

        • #806896

          The Code Sorter is useful too. I try to end up with all procedures relating to a particular control together which the VBA IDE does not make easy!

          MZ-Tools is a salutary example to MS of how deficient their IDE is!

      • #806766

        Charlotte,

        Thanks. I looked at the MZ-Tools website. Most of it seemed related to VB, especially related to managing a VB project, rather than VBA; or at least that was my impression. There did seem to be a couple of useful features in addition to the Comment and Error Handler add-ins, such as the ability to copy event procedures when copying a control, and the add-in to make creating message boxes easier. Any other features you’ve found really useful in Access?

    • #806655

      I have to admit that I looked briefly at these add-ins and returned gratefully to MZ-Tools, which is cheap and extremely flexible, plus it includes a bunch of other utilities and templates, not just error handling and code commenting templates.

    Viewing 1 reply thread
    Reply To: Reply #806945 in VBA Error Handler Add-in (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel