Methods to inspect other methods and classes

%3CLINGO-SUB%20id%3D%22lingo-sub-2808995%22%20slang%3D%22en-US%22%3EMethods%20to%20inspect%20other%20methods%20and%20classes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2808995%22%20slang%3D%22en-US%22%3E%3CP%3EAre%20there%20any%20VBA%20methods%20similar%20to%20Python%20methods%20like%20globals()%2C%20locals()%2C%20dir()%20and%20even%20help()%20which%20allow%20you%20to%20inspect%20and%20learn%20more%20about%20VBA%20methods%20programmatically%20or%20from%20the%20immediate%20pane%2C%20for%20example%3F%20I.e.%2C%20to%20print%20a%20list%20of%20arguments%20that%20some%20given%20method%20takes%2C%20or%20the%20methods%20of%20a%20class%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2808995%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2809025%22%20slang%3D%22en-US%22%3ERe%3A%20Methods%20to%20inspect%20other%20methods%20and%20classes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2809025%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1154117%22%20target%3D%22_blank%22%3E%40jukhamil%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESee%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.appspro.com%2FUtilities%2FDocumentor.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EThe%20Code%20Documentor%3C%2FA%3E%20(free%3B%20Excel%20only)%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.accessmvp.com%2Fstrive4peace%2FCodeDocumenter.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ECode%20Documenter%3C%2FA%3E%20(free%3B%20requires%20that%20you%20have%20Microsoft%20Access%3B%20works%20with%20Access%2C%20Excel%2C%20PowerPoint%20and%20Word)%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22MZ-Tools%22%20href%3D%22https%3A%2F%2Fwww.mztools.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.mztools.com%2F%3C%2FA%3E%20(paid%3B%20for%20VBA%2C%20VB5%2C%20VB6%20and%20Visual%20Studio)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Are there any VBA methods similar to Python methods like globals(), locals(), dir() and even help() which allow you to inspect and learn more about VBA methods programmatically or from the immediate pane, for example? I.e., to print a list of arguments that some given method takes, or the methods of a class?

 

Thank you very much.

5 Replies

@jukhamil 

See:

The Code Documentor (free; Excel only)

Code Documenter (free; requires that you have Microsoft Access; works with Access, Excel, PowerPoint and Word)

https://www.mztools.com/ (paid; for VBA, VB5, VB6 and Visual Studio)

Thanks. So does this provide more VBA commands/functions or are they macros you run, i.e. Subs?

@jukhamil 

The first and third one are add-ins in the Visual Basic Editor; they add new menu options.

The second one is an Access database with forms to let you specify what you want to document.

Thanks. Is it possible to execute commands in the Immediate Pane but via the Command Prompt, somehow sending the Command Prompt input to the immediate pane and bringing back the output? Or any good way to work with VBA from the Command Prompt?

@jukhamil 

I cannot help you with that, sorry.