How to print Modules print code

  • Thread starter javiernews via AccessMonster.com
  • Start date
J

javiernews via AccessMonster.com

Can any body help me??
I want to show the code lines in a module like this:


Public Function funLinesOfCode() As Long
Dim dbCur As DAO.Database
Dim doc As DAO.Document

Set dbCur = CurrentDb
' Count lines of code in Modules

For Each doc In dbCur.Containers("Modules").Documents
DoCmd.OpenModule doc.Name
funLinesOfCode = funLinesOfCode + Modules(doc.Name).countOfLines
MsgBox xxxxxxxxxxxx
DoCmd.Close acModule, doc.Name, acSaveNo
Next doc

etc......

Now I only get numer lines but I need to show the code lines in a MsgBox

thank you !
 
D

Douglas J. Steele

MsgBox Modules(doc.Name).Lines(1, n)

will show the first n lines of code in the module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top