Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1335
  • Last Modified:

Count all lines of program code in MS Access database

I would like to know how many lines of VBA program code is contained in my Access 2010 database.

I suppose the best way to do this is to export all code into MS Word and let Word count the number of paragraphs. It would take a while to manually open every module, form, and report to copy and paste the code into MS Word.

Is there a way to automate exporting all the program code--or to simply count the number of lines of code?

By the way, if I put the code into MS Word, I will delete all the blank lines before counting.
0
gordonwwaugh
Asked:
gordonwwaugh
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Access doesn't really store that information, but the free MZTools VBA utility has a Statistics feature:

www.mztools.com

Install that, then open the VB Editor, and you'll find MZ Tools under the Tools menu there.
MZ ToolsMZ Tools even tells you the number of blank lines ... really an amazing tool for free (although you can donate to the author if you'd like).
0
 
PatHartmanCommented:
I like MzTools also but here's an alternative.  The file includes a link to the website I copied the code from.
CountLinesOfCode.docx
0
 
gordonwwaughAuthor Commented:
MZ-Tools is awesome! Thanks very much for telling me about it. This will save me a lot of time in the future.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Long live MZTools ...
And FYI ... there is a recent newer VBA version ... so, be sure you  have the latest ... if you have not downloaded in day the last six months or so.

mx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now