Welcome Guest. | Log In| Register | Membership Benefits

News In Review

May 31, 1999

Print this story
Print this story
Microsoft Takes New Direction With VBA 6.0

Upgrade offers easier integration, better performance

By Don Kiely

Microsoft's latest release of Visual Basic for Applications, version 6.0, should make it easier for third-party developers to enhance Windows applications--both from a technical and business perspective. VBA is Microsoft's method for adding program functionality to commercial Windows applications.

Microsoft has added several enhancements to VBA's language capabilities, but perhaps more significant is the company's new licensing arrangements. In the past, Microsoft relied on its two licensing agents, Summit Software Co. and Mystic River Software Inc., to serve as the primary contacts for VBA licensees. As a result of this setup, each agent developed its own tools and resources for customers, which significantly affected how VBA functioned within a Windows application.

Microsoft has decided to resume responsibility for VBA tool development and is taking a more aggressive approach to marketing the product. In the past, licensees had to jump through hoops before being given access to VBA for evaluation. Among the requirements, they had to provide a statement of how they might use VBA in their applications. Now, Microsoft has assembled a VBA evaluation kit and seems to want to get it into the hands of every potential licensee as quickly as possible.

Microsoft clearly wants more developers to embed VBA in their applications and is working to make the integration process easier. Microsoft Developer Network Universal subscribers can download the 47-Mbyte software developers' kit and documentation from Microsoft's Web site, and anyone can request the boxed evaluation kit.

Language Enhancements
VBA 6.0's language and tool enhancements are compatible with enhancements to Visual Basic 6.0, the latest version of the standalone development product released last fall. Even though Office 2000 is set to hit the streets in early June, some of these new VBA features didn't make it into Office. This means companies that license VBA can have features that Microsoft doesn't yet expose in its own products.

Microsoft has done a good job of addressing security issues in VBA 6.0. Developers can digitally sign their projects to both identify who wrote the VBA code and discover whether the code has been tampered with.

In another language enhancement, VBA 6.0 lets developers take advantage of ActiveX Designers introduced in Visual Basic. These code modules support the creation of specific program functions, such as the creation of data reports and Web server components. VBA 6.0 lets end users utilize these designers in the development environment, but the VBA developers' kit doesn't have the tools to create them. For that, VBA integrators will need to use the tools within the Enterprise Edition of Visual Studio.

Microsoft has also addressed performance issues in VBA 6.0. VBA code is interpreted, which has made VBA applications notoriously sluggish. VBA 6.0 supports multithreaded applications so that multiple sections of code can run at the same time, giving a boost to perceived performance.

The previous version of VBA consisted of a complex set of Component Object Model interfaces, API functions, and services to support the integration of new features into host applications. Even C++ programmers, who are accustomed to messy COM interfaces, found these interfaces complex and extremely difficult to implement. This is undoubtedly a major reason why Microsoft initially turned to outside licensing agents to provide front-line support to companies integrating VBA.

The maze of underlying VBA COM interfaces is still available for use when integrating VBA. The developers' kit also includes an Application Programmability Component--an ActiveX object that wraps the raw COM interfaces, making programming a VBA host application much easier in any development environment that supports COM objects.

APC consists of objects with properties, events, and methods for instantiating and programmatically controlling VBA within a host application. APC also supports the management of project items, storage of VBA projects, recording of macros, and enabling features such as multithreading and digital signing.

Besides providing programmable ActiveX objects, APC includes a number of other features to ease the chore of integrating VBA into an application. Automation interfaces allow integration of VBA into applications written in Visual Basic. Default host interfaces eliminate much of the work needed to integrate VBA into host applications written in C or C++.

APC includes a set of template classes to integrate VBA into a Microsoft Foundation Class application. MFC is an extensive set of C++ classes that make Windows programming more productive. APC classes provide a number of base classes that support MFC-style persistence, message loop handling, and OLE control containment. By overriding the default implementations in these base classes, you can customize VBA to fit your application. The developers' kit header file ApcCpp.h provides support for non-MFC application, document, project-item, and control-containment classes. These features in the VBA developers' kit support MFC and non-MFC applications, opening VBA hosting to applications written in any development environment that supports COM.

continued...page 2


Back to This Week's Issue

Send Us Your Feedback

Top of the Page