v1.0.0
Pre-release
Pre-release
First public release. Has 2 main methods and 2 ways of calling them:
ActiveX DLL (Tools⇒Add Reference)
Function GetStandardModuleAccessor(ByVal moduleName As String, ByVal proj As VBProject) As Object
Function GetExtendedModuleAccessor(ByVal moduleName As String, ByVal proj As VBProject, Optional ByRef outPrivateTI As [_ITypeInfo]) As ObjectStandard DLL Declare
Declare PtrSafe Function GetStandardModuleAccessor Lib "vbInvoke_win64" (ByVal moduleName As Variant, ByVal proj As VBProject) As Object
Declare PtrSafe Function GetExtendedModuleAccessor Lib "vbInvoke_win64" (ByVal moduleName As Variant, ByVal proj As VBProject, ByRef outPrivateTI As IUnknown) As ObjectNote: The standard DLL version uses Variant for the module name and has no optional arguments
These 2 functions create "Accessors": IDispatch Objects that can be used with dot notation accessor.Foo or call by name CallByName(accessor, "Foo", ...) to invoke
- Public methods/functions/properties of modules (Standard Accessor)
- Public or Private methods/functions/properties (Extended Accessor)
You can also use the Extended Accessor in a For-Each loop to print all the public & private methods (although this API may change to be more useful):
Dim exampleModuleAccessor As Object
Set exampleModuleAccessor = GetExtendedModuleAccessor("ExampleModule", ThisWorkbook.VBProject)
For Each methodName In exampleModuleAccessor
CallByName exampleModuleAccessor, methodName, vbMethod
Next methodNameFinally you can reference this library as a .twinpack. This library only works when compiled into in-process DLLs or VBE Addins - it cannot be used to create a standalone EXE as it relies on sharing memory with the active VBProject.