Hi all
I've been advised about adding header comments to a software, i am using a reference to the Microsoft VB Application extensibility, it works but i need to modify a little bit. I need to know the number of procedures in the software, comprised forms, modules, reports anything that can have code or can be coded.
i.e.
a form can have 2 functions and 2 private subs.
another form can have 3 private subs.
a report can have 2 Private Subs
a module can have a function and 2 private Subs.
in the last example i have 12 procedures in the whole system
which is in 2 forms, a module and a report.
I need to get that number 12 by coding using a property. I was using the next code:
Dim oVBE As VBIDE.VBE
Dim oCM As CodeModule
Dim numprog As Integer
Set oVBE = Application.VBE
Set oCM = VBE.ActiveVBProject.VBComponents(1).CodeModule
numprog = oCM.CodePane.Collection.Count
numprog was the number of procedures, and it was working fine, but now is not. Could anyone advise. Thank you
I've been advised about adding header comments to a software, i am using a reference to the Microsoft VB Application extensibility, it works but i need to modify a little bit. I need to know the number of procedures in the software, comprised forms, modules, reports anything that can have code or can be coded.
i.e.
a form can have 2 functions and 2 private subs.
another form can have 3 private subs.
a report can have 2 Private Subs
a module can have a function and 2 private Subs.
in the last example i have 12 procedures in the whole system
which is in 2 forms, a module and a report.
I need to get that number 12 by coding using a property. I was using the next code:
Dim oVBE As VBIDE.VBE
Dim oCM As CodeModule
Dim numprog As Integer
Set oVBE = Application.VBE
Set oCM = VBE.ActiveVBProject.VBComponents(1).CodeModule
numprog = oCM.CodePane.Collection.Count
numprog was the number of procedures, and it was working fine, but now is not. Could anyone advise. Thank you