I have a number of excel work books which has an number of Macros. I need to document the Macros and extract all macro source code and Forumulae on to a single document.
Is this possible by Automation? If yes, could you please tell me how?
First, you need to enable "Trust programmatic access to VB Project" (Excel 2007 > Ribbon > Developer tab > Macro Security > Macro Settings, or Excel 2003 > Tools > Macro > Security > Trusted Publishers tab).
Then you need to (well, you don't need to, but it will make your life easier) add a reference to "Microsoft Visual Basic for Applications Extensibility" to your project.
Then you can look at the methods and properties available to the [blue][tt]Workbook.VBProject[/tt][/blue]. It is usable but it's rather like working with a text file.
Enjoy,
Tony
------------------------------------------------------------------------------------ We want to help you; help us to do it by reading this:Before you ask a question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.