Results 1 to 14 of 14
  1. #1
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    VBA Error Handler Add-in (2000)

    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?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA Error Handler Add-in (2000)

    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.
    Charlotte

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: VBA Error Handler Add-in (2000)

    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?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA Error Handler Add-in (2000)

    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.
    Charlotte

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: VBA Error Handler Add-in (2000)

    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.
    Wendell

  6. #6
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Error Handler Add-in (2000)

    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!
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  7. #7
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: VBA Error Handler Add-in (2000)

    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.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  8. #8
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: VBA Error Handler Add-in (2000)

    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?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA Error Handler Add-in (2000)

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> We keep it a secret, Mark, and only tell special people about it. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> Welcome to the club.
    Charlotte

  10. #10
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Error Handler Add-in (2000)

    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

  11. #11
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: VBA Error Handler Add-in (2000)

    Well thanks for letting me in the club! <img src=/S/blackteeth.gif border=0 alt=blackteeth width=20 height=20>
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA Error Handler Add-in (2000)

    Question 1: I have no clue. <img src=/S/blackteeth.gif border=0 alt=blackteeth width=20 height=20>

    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.
    Charlotte

  13. #13
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Error Handler Add-in (2000)

    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.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  14. #14
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA Error Handler Add-in (2000)

    It works with XP, did not try yet with 2003

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •