Learning MicroStation VBA

Chapter 38: Writing VB6 Applications

We have written a lot of code in VBA. Now it's time to write some code in Visual Basic 6.

Differences between VBA and VB6

VBA and VB6 have a great deal in common. Of course, they both make use of the language, "Visual Basic". Projects are broken out into Code Modules, User Forms, and Class Modules. Each environment allows References to be added to the project. There are also some differences.

  • In VBA, Code Modules, Classes, and User Forms are all contained in a single .mvba file. In VB6, Code Modules, Classes, and User Forms each have their own file (.bas, .cls, and .frm files) and a single Project file (.vbp) which brings them all together.

  • MicroStation VBA projects must be run from within MicroStation's VBA environment. Excel's VBA projects must be run from within the Excel VBA environment. VB6 projects are compiled into executable programs (.exe) and can be run independent of any other application. VB6 projects can also be compiled into DLL files and ActiveX Controls (.ocx files).

  • Since VBA Projects are self-contained, changes made to Code Modules, Classes, and User Forms in a VBA project remain in the project. Multiple VB6 projects can utilize the same Code Module, Class Module, or User Form file. So changes made to VB6 resources may be reflected in multiple VB6 projects. This is a powerful feature but be careful that changes made to a resource file (.bas,...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Building Automation System (BAS) Integrators
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.