D
davidm
I am having trouble running the following (CPearson's) code.
Sub ListProcedures()
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim Msg As String
Dim ProcName As String
Set VBCodeMod
ThisWorkbook.VBProject.VBComponents("SaveModule").CodeModule
With VBCodeMod
StartLine = .CountOfDeclarationLines + 1
Do Until StartLine >= .CountOfLines
Msg = Msg & .ProcOfLine(StartLine, *vbext_pk_Proc*) & Chr(13)
StartLine = StartLine + _
.ProcCountLines(.ProcOfLine(StartLine, _
*vbext_pk_Proc), * *vbext_pk_Proc*)
Loop
End With
MsgBox Msg
End Sub
Excel balks at vbext_pk_Proc. In the past, when some such problem wa
encountered, I squirmed out of trouble by using the numerical constan
values - as in using 1 for vbext_ct_stdModule, 100 fo
vbext_ct_document etc. The Help files do not seem to give the numeri
constant for vbext_pk_Proc. Any help will be appreciated
Sub ListProcedures()
Dim VBCodeMod As CodeModule
Dim StartLine As Long
Dim Msg As String
Dim ProcName As String
Set VBCodeMod
ThisWorkbook.VBProject.VBComponents("SaveModule").CodeModule
With VBCodeMod
StartLine = .CountOfDeclarationLines + 1
Do Until StartLine >= .CountOfLines
Msg = Msg & .ProcOfLine(StartLine, *vbext_pk_Proc*) & Chr(13)
StartLine = StartLine + _
.ProcCountLines(.ProcOfLine(StartLine, _
*vbext_pk_Proc), * *vbext_pk_Proc*)
Loop
End With
MsgBox Msg
End Sub
Excel balks at vbext_pk_Proc. In the past, when some such problem wa
encountered, I squirmed out of trouble by using the numerical constan
values - as in using 1 for vbext_ct_stdModule, 100 fo
vbext_ct_document etc. The Help files do not seem to give the numeri
constant for vbext_pk_Proc. Any help will be appreciated