Visual Basic for Applications (VBA) Interface Components

Although VBA is not a component of Microsoft Jet, it works as an expression evaluator to evaluate various functions that appear in SQL statements and to do arithmetic. The Microsoft Jet expression service takes an expression and builds a tree out of it. Elements of this tree are then passed to VBA for evaluation.

Various VBA components are used to provide this functionality to Microsoft Jet. VBAJet32.dll is used to start VBA. When Microsoft Jet is running in a stand-alone environment (not being run by a host application such as Microsoft Access), the VBA run-time component, VBAR332.dll, is used. However, if a host application other than Visual Basic 5.0 (for example, Microsoft Access 97) is running, then VBA332.dll is used. If Visual Basic 5.0 is running, then VBA5.dll is used. The following table describes the VBA interface components.

Component Description
VBAJet32.dll Initializes the VBA expression service for Microsoft Jet.
VBAEn232.olb Contains international resources and localized strings for the VBA components.
VBA332.dll The full version of the VBA expression service.
VBAR332.dll The run-time version of the VBA expression service.

Notable VBA Interactions

Prior to version 3.0, Microsoft Jet made calls to the Basic interpreter built into Microsoft Access and Visual Basic to get its expression evaluation functionality. In current versions, Microsoft Jet uses VBA.

VBAJet32.dll checks to see whether there is a version of VBA already in memory. If there isn’t one, Microsoft Jet will load one of three potential DLLs (VBAR332.dll, VBA332.dll, VBA5.dll) to get its expression evaluation functionality, as described earlier in this section.

It is also worthwhile to note the order in which you load engine hosts, such as Microsoft Access and Microsoft Excel. For example, if you first load the ODBC Desktop Database Drivers, Microsoft Jet uses the VBA run-time DLL (VBAR332.dll). If you subsequently load Microsoft Access, the instance of Microsoft Jet loaded by Microsoft Access uses the full VBA DLL (VBA332.dll). If, on the other hand, you load Microsoft Access first, and then the ODBC Desktop Database Drivers, both instances of Microsoft Jet use the VBA332.dll because the engine’s VBA initialization DLL sees that VBA332.dll is already in memory and uses it. If you want to reduce the memory footprint of Microsoft Jet, load Microsoft Access first, and then other applications or drivers that use the Jet database engine.