views:

293

answers:

1

I find that when I'm reviewing VBA code most of the bugs are dumb ones, typos, Not setting things to Nothing, not closing DB connections, etc.

I know that using Option Explicit can solve some of these, but I'd rather something more powerful.

So...

Are there any static analysis tools for VBA?

+4  A: 

You can perhaps start by using MZ-Tools. While it does not have much in the realm of static analysis features, it is free and does provide some help in managing and editing your code base.

One feature it has that does perform a form of static analysis is:

  • Review Source Code- An extremely limited version of code analysis. It tells you if a variable, constant, or procedure is not being used. Good to help clean up your code and get rid of cruft.
Ray Vega