Tech Support Guy banner
Status
Not open for further replies.

Solved: How to get to Excel VBA code modules using VBA?

2K views 5 replies 3 participants last post by  slurpee55 
#1 ·
In MS Access you can write VBA code that allows you to manipulate the existing VBA code in standard and class modules by using the Modules collection of the application object.

In Access VBA, the Application.Modules collection contains only open modules

I am trying to do a similar same thing in Excel but with no luck.

There appears to be an undocumented Modules collection in Excel but the Modules.Count always comes back as zero. If this works the same way as in Access VBA, then none of the modules are officially "open" (including the one I'm executing).

Anyone have any experience doing this sort of thing in MS Excel VBA?

I just want to write some quick and dirty code to do some rudimentary analysis of an Excel application that was dropped on my desk. I want to do things like counting lines of code, and identifying the entry points and global declarations.

Yes, I can cut and paste all of the code into a text file and analyze that but I was looking for a more elegant solution.
 
See less See more
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top