Microsoft KB Archive/170298

From BetaArchive Wiki

VBA Software Development Kit

ID: Q170298



The information in this article applies to:


  • Visual Basic for Applications (VBA) 5.0 Software Development Kit (SDK), version 1.0, used with:
    • Microsoft Windows NT 4.0
    • Microsoft Windows 95





SUMMARY

Microsoft is now licensing its Visual Basic for Applications 5.0 (VBA) technology to 3rd-party developers. This article covers some of the most Frequently Asked Questions (FAQ) about VBA and how you can integrate it into your own application. Information about how to license VBA technology is also provided.



MORE INFORMATION

  1. Q. What is VBA?

A. Microsoft Visual Basic for Applications (VBA) is a powerful visual programming environment that is seamlessly integrated into another program, known as a "host". With VBA, users can easily extend or customize the behavior of the host by writing code using the popular Visual Basic programming language.

The new Visual Basic code is contained in a Project, which is compiled and saved along with the application's data file. The Project essentially becomes an integral part of the host whenever that file is opened.

For example, the major Microsoft Office 97 applications are hosts for VBA. VBA lets you customize what happens when a user opens an Excel worksheet, or when a button on a form in a Word 97 document is clicked. Complex, cross- application, enterprise-wide solutions can be created using the power of VBA.

The VBA programming environment offers the same amenities as the Visual Basic 5.0 user interface. Although it exists outside the host's application window, the IDE runs in the same memory space as the host. This means tighter integration for event handling, code execution, and better performance.

VBA's visual programming environment also provides the following:


  • Enhanced code editor with syntax checking, color-coded syntax, and support for code drag-and-drop
  • Project Explorer for navigating open projects and their components
  • Properties window for setting and viewing object properties
  • New debugging tools to track program execution and locate bugs
  • Object Browser for browsing and searching for properties and methods across object model libraries
  • IntelliSense features for instant syntax reference and object model assistance to reduce programming time
  • Code security with improved password protection and encryption to lock both documents and projects
  • Conditional compilation so you can include debugging code that will not execute in the final version of your application
  1. Q. What platforms are supported?

A. Versions of VBA are planned for the following 32-bit platforms:


  • Microsoft Windows[ASCII 174] 95 and Windows NT on Intel platforms
  • Alpha RISC platforms
  • Macintosh/PowerPC

VBA is not supported on UNIX or 16-bit platforms.


  1. Q. What languages are supported?

A. The following localized versions of VBA are available or planned:


  • Chinese (Traditional Characters)
  • Chinese (Simplified Characters)
  • Czech
  • Danish
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Greek
  • Hungarian*
  • Italian
  • Japanese
  • Korean
  • Norwegian
  • Portuguese
  • Brazilian Portuguese
  • Polish*
  • Russian*
  • Slovenian*
  • Spanish
  • Swedish
  • Turkish*
  • Arabic (to be determined)
  • Hebrew (to be determined)

NOTE: Help files will not be localized for languages marked with * above. In those cases, only the VBA programming interface will be localized.


  1. Q. Is there support for multi-threading?

A. VBA does not support multi-threading. It can, however, be used in applications that are multi-threaded, provided that VBA is initialized and accessed only from the main UI thread.


  1. Q. What about the Mac?

A. A version of VBA is currently planned for the Power-Mac PowerPC.


  1. Q. How is VBA related to Visual Basic 5.0? To VBScript?

A. Visual Basic 5.0 is a powerful programming tool for generating new applications and ActiveX controls. Although VBA includes the same visual programming environment as Visual Basic 5.0, it does not support creating separate programs; instead, VBA allows users to extend the application that is hosting it.

VBScript is a simple ActiveX Script engine that interprets and executes a subset of the Visual Basic language. The code for such scripts exists outside the application, whereas VBA code is part of a compiled Project that is tightly integrated with its host. In addition, VBScript offers no integrated development environment.

You should carefully consider your needs when deciding whether to host VBScript or VBA. Integrating VBA is considerably more difficult than adding VBScript capabilities to your code.

For more information about VBScript, visit the VBScript home page on the Microsoft web site:

http://www.msdn.microsoft.com/scripting/vbscript

  1. Q. How do I integrate VBA5 into my application?

A. Integration involves intensive work with C/C++ and COM programming. To assist developers with this process, Microsoft provides the Visual Basic for Applications 5.0 Software Development Kit (VBA5 SDK). It contains required software libraries, source files, and DLLs, a test kit, re- distributable files, a Failsafe Install program, and API documentation and integration guides. An included sample, TTHost, walks developers through the various steps required to successfully integrate VBA into a host application.


  1. Q. How can I obtain the VBA5 SDK?

A. Microsoft has authorized two sales agents, Mystic River Software and Summit Software Company, to handle the licensing and technical support for all 3rd-party developers. The VBA5 SDK is available only through these sales agents. See the "References" section below for addresses and phone numbers.


  1. Q. Do I have to install Office 97 so that my host application will work?

A. Office 97 is not required on development or user machines in order for your host application to run. When you install your application, you install all the necessary VBA files. The special Failsafe Install dll, included in the VBA5 SDK, is flexible enough to be used by your own setup program to ensure proper installation and avoid conflicts with other host applications.

If Office 97 is installed, however, your host will work with the those applications, as well as any other 3rd-party applications that host VBA, the same way they work with each other. This gives your application the added flexibility of working independently or as part of an Office 97 solution.


  1. Q. Where do my developers get technical support during the integration

effort?

A. Technical support for 3rd-party developers is offered in accordance with the provisions of your license agreement with your sales agent. Please refer questions about the nature and scope of that support to them.


  1. Q. Where do my users get technical support for writing their Visual

Basic code?

A. A complete set of VBA reference help files are included with the VBA5 SDK. The Failsafe Install program automatically installs them on your user's machines during setup. The VBA5 SDK also includes a set of printable documentation you may want to distribute with your application.

In addition, there are many sources of help available for users writing Visual Basic code. Visit the following web sites and newsgroups for more information:

http://www.msdn.microsoft.com/vbasic

http://www.msdn.microsoft.com/officedev

  1. Q. Is there a logo program?

A. You can place the "Featuring Microsoft Visual Basic Technology" logo on marketing materials for any application that earn it. For more information on the VBA Logo program, visit the Microsoft web site listed in the REFERENCES section below.



REFERENCES

Here are the addresses and phone numbers for the VARs:

   Summit Software Company
   4933 Jamesville Road
   Jamesville, NY 13078-9428
   Telephone: 315-445-9000
   Fax: 315-445-9567 
   Mystic River Software
   142 North Road
   Sudbury, MA  01776
   Telephone: 508-371-1100
   Fax: 508-371-1818 

For information about how to license VBA, product features, logo programs, press releases, links to Summit Software Company and Mystic River Software web sites, as well as other useful information, please refer to the Visual Basic for Applications home page on the Microsoft web site:

http://www.msdn.microsoft.com/vba

For all developer support questions related to integrating VBA into a host application, please contact your licensing sales agent for resolution.

For questions about VBA5 syntax or usage, or for questions about how to program a specific host application, please contact the software vendor for assistance.

Additional query words:

Keywords          : kb3rdparty kbprg 
Version           : winnt:1.0,4.0
Platform          : winnt 
Issue type        : kbinfo 

Last Reviewed: July 30, 1999