Solved

Count all lines of program code in MS Access database

Posted on 2014-09-11
4
1,172 Views
Last Modified: 2014-09-11
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
Comment
Question by:gordonwwaugh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40317477
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
 
LVL 37

Expert Comment

by:PatHartman
ID: 40317503
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
 
LVL 1

Author Closing Comment

by:gordonwwaugh
ID: 40317517
MZ-Tools is awesome! Thanks very much for telling me about it. This will save me a lot of time in the future.
0
 
LVL 75
ID: 40317789
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question