Thread
:
Can VBA be used to list macros
View Single Post
#
1
Posted to microsoft.public.excel.programming
Rob Bovey
external usenet poster
Posts: 811
Can VBA be used to list macros
Hi James,
Download my VBA Code Documentor utility from the web site below my sig.
The code is unprotected, so you can dig in and see how it works.
--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/
* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
"James Price" <James
wrote in message
...
I want to be able to use VBA to find out the list of macro names in a
workbook. I have used code (see below) that can give me the module names,
and also tried with the CodePane function, but I think I'm being a bit
thick
and missing something.
Answers gratefully received
Thanks
James
Sub FindMacros()
Dim vbComp As VBIDE.VBComponent
Dim wb As Workbook
Set wb = ThisWorkbook
For Each vbComp In wb.VBProject.VBComponents
Debug.Print vbComp.Type & " " & vbComp.Name
Next
End Sub
Reply With Quote
Rob Bovey
View Public Profile
Find all posts by Rob Bovey