Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADV Subject: Getting VBA Module USING Code 1

Status
Not open for further replies.

MoGryph

Programmer
Nov 1, 2000
99
0
0
US
Anyone know how to read/decompile a module's code, using code?

I recognize that the MSysModules2 table contains the information about my modules, and there's a field called "Module", but it's in LongBinaryData. I exported the data from one, and have NO IDEA how to read it (yeah, it's all LongBinary).

My assumption is that the code in the Module is the Compiled version of my code, but Access MUST somehow re-Decompile the code for me to be able to view it! Either that, or it's just some compressed version of the source code from my modules. I'd like to use the same approach to programmatically read my Modules.

Any help or ideas or where to start would be useful.

Thanks,
-MoGryph
 
I'm confused by the question. You can easily 'read' your module's code via the modules collection and the lines (sub) collection. You can inspect the various 'properties' of each module and line, a-la any object in the VBA world. Given this? why are you trying to look at the system tables -which do not remain the same from release to release?

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Ah... Well, your question answered mine! I hadn't known about the existance of the Modules Collection.

And I thought I knew a little something about Access! heh 80) I guess I hadn't poked around enough (nor browsed the Object Library enough.) And after looking at it, I realize how easy that should have been for me to find and figure out. I feel like such an amateur now. heh

As always MichaelRed, your knowledge is immense! Thanks.

-MoGryph
[80)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top