VBA to capture (print or list) names of all Sub's or Function macro's in Personal.xls

E

EagleOne

2003 & 2007

Does anyone have a macro that documents (at least the names) of all Subs and/or Functions in a VBA
Project; module?

I would like to prepare an Excel WS that lists the names of all of my sub-routines functions in my
Personal.xls

The answer is probably staring me in the face.

TIA EagleOne
 
E

EagleOne

I get an User-defined type not defined error when I use Chip Pearson's included function below:

Function ProcKindString(ProcKind As VBIDE.vbext_ProcKind) As String
Select Case ProcKind
Case vbext_pk_Get
ProcKindString = "Property Get"
Case vbext_pk_Let
ProcKindString = "Property Let"
Case vbext_pk_Set
ProcKindString = "Property Set"
Case vbext_pk_Proc
ProcKindString = "Sub Or Function"
Case Else
ProcKindString = "Unknown Type: " & CStr(ProcKind)
End Select
End Function

Do you know what library I need to reference? My guess is that is the cause of the error.

Thanks
 
E

EagleOne

I get an User-defined type not defined error when I use Chip Pearson's included function below:

Function ProcKindString(ProcKind As VBIDE.vbext_ProcKind) As String
Select Case ProcKind
Case vbext_pk_Get
ProcKindString = "Property Get"
Case vbext_pk_Let
ProcKindString = "Property Let"
Case vbext_pk_Set
ProcKindString = "Property Set"
Case vbext_pk_Proc
ProcKindString = "Sub Or Function"
Case Else
ProcKindString = "Unknown Type: " & CStr(ProcKind)
End Select
End Function

Do you know what library I need to reference? My guess is that is the cause of the error.

Thanks
 

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