![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is there a way to determine how many lines of code are contained within a VBA module? Thanks. This is straight out of help. It includes blank lines as well |
#3
| |||
| |||
|
|
Charles Hottel wrote: Is there a way to determine how many lines of code are contained within a VBA module? Thanks. This is straight out of help. It includes blank lines as well Public Sub ModuleLineTotal1(ByVal strModuleName As String) Dim mdl As Module ' Open module to include in Modules collection. DoCmd.OpenModule strModuleName ' Return reference to Module object. Set mdl = Modules(strModuleName) ' Print number of lines in module. MsgBox "Number of lines: " & mdl.CountOfLines ' Print number of declaration lines. MsgBox "Number of declaration lines: " & mdl.CountOfDeclarationLines End Sub |
#4
| |||
| |||
|
|
Charles Hottel wrote: Is there a way to determine how many lines of code are contained within a VBA module? Thanks. This is straight out of help. It includes blank lines as well Public Sub ModuleLineTotal1(ByVal strModuleName As String) Dim mdl As Module ' Open module to include in Modules collection. DoCmd.OpenModule strModuleName ' Return reference to Module object. Set mdl = Modules(strModuleName) ' Print number of lines in module. MsgBox "Number of lines: " & mdl.CountOfLines ' Print number of declaration lines. MsgBox "Number of declaration lines: " & mdl.CountOfDeclarationLines End Sub |
#5
| |||
| |||
|
|
There must be something about using Help in Access 2003 that I do not understand or else Help is useless. Before I posted my question I search for and answer for over 20 minutes and found nothing. After receiving you answer I tried again to see what I could learn, but still no joy. Then I went to Google and found a web page with this code right away. |
#6
| |||
| |||
|
|
There must be something about using Help in Access 2003 that I do not understand or else Help is useless. Before I posted my question I search for and answer for over 20 minutes and found nothing. After receiving you answer I tried again to see what I could learn, but still no joy. Then I went to Google and found a web page with this code right away. |
![]() |
| Thread Tools | |
| Display Modes | |
| |