I have been working on a pretty big Access Database for a while now and it is coming to an end in terms of dev.
I wanted to get some stats on how many lines of code the database has.
I wrote a simple procedure to do this: -
This works, but only if the module has been opened by me! So, if I go through and manually open up all the modules for each of the forms the module count is updated and the modules line count is available.
Does anyone know how I can get this to work for ALL modules without me needing to open them up... manually!
I wanted to get some stats on how many lines of code the database has.
I wrote a simple procedure to do this: -
Code:
Private Sub Command0_Click()
Dim mrd As Module
Dim NumLines As Long
For i = 0 To Application.Modules.Count - 1
Set mrd = Application.Modules(i)
Debug.Print mrd
NumLines = NumLines + mrd.CountOfLines
Next
MsgBox NumLines
End Sub
This works, but only if the module has been opened by me! So, if I go through and manually open up all the modules for each of the forms the module count is updated and the modules line count is available.
Does anyone know how I can get this to work for ALL modules without me needing to open them up... manually!