Visual BASIC for Applications

See also: VBA

Visual BASIC for Applications (VBA) is an implementation of Microsoft Visual BASIC which is integrated in all the applications of Microsoft Office, in some other Microsoft applications like Visio and at least partially in some other applications like AutoCAD and WordPerfect. It replaces and extends the capacities of the languages macro specific to the oldest applications like the WordBasic language integrated into an old version of the Word software, and can be used to control the near total of IHM applications hosts , which includes the possibility of handling the functionalities of the user interface like the menus, the toolbars and the fact of being able to personalize the dialog boxes and the forms users.

As its name indicates it, VBA is very related to Visual BASIC (syntaxes and concepts of the two languages resemble each other), but can normally only carry out code coming from a application host (and not of an autonomous application). It can however be used to control an application from an other (for example, to create automatically a document Word starting from data Excel).

The paragraph above calls application host an application embarked in a document, i.e. a whole of macros.

VBA is functionally rich and extremely flexible device but it has important limitations, like its limited support of the functions of recall ( callbacks ), as well as a management of the very old errors, use of handler of errors instead of a mechanism of exceptions.

Even if these limitations return this language very little used by the developers data processing specialists anxious to use tools before very powerful, its simplicity and its accessibility allured certain professions in particular in finance.

Obsolescence

Since the first July 2007, Microsoft does not distribute lpus licenses VBA to its new customers Microsoft tries to replace VBA by Visual Studio Tools for Applications (VSTA), a toolkit of customization of application based on the platform .NET Framework. Of Dr. Ex' S article:

VSTA replaces now VSA Studio for Applications like technology ISVs to use to provide functionalities of customization in their applications. VSA was a light Client, alternative managed by serveurde VBA compiled under Visual Studio. The approach waiter was seen by ISVs like less useful than a rich model of customer, therefore, while being based on their returns, Microsoft began the development of VSTA. Of ISVs use VSA today, but we find that its applicability was limited. Certain destechnologies developed for VSA are included in VSTA. VSTA customization application benefits better from the functionalities of the rich customer than VSA, offering an environment highly optimized for the customization of application at the same time on the customer and the waiter.

VSTA now replace VSA Studio for Applications ace the technology ISVs will uses to provide customization capabilities in their applications. VSA has Thin-customer, server-driven alternative to VBA built one Visual Studio. The server approach was viewed by ISVs ace less useful than has rich-customer model, so based one to their feedback, Microsoft began development off VSTA. There are ISVs successfully using VSA today, goal we found that its applicability was limited. Summon off the technology developed for VSA is incorporated within VSTA. VSTA application customization takes better advantage off rich customer functionality than VSA, offering has highly optimized environment for application customization one both the customer and the server.

Office 2007 continues to use old engine VBA; however, Visual Studio Tool for Office (VSTO) is available. The assumption of responsibility of VBAdans Microsoft Office for Mac will be abandoned with the distribution of version 12, in 2008. See also VB.NET. The first version of VSTA was provided in April 2006 and was integrated in various ISV, including InfoPath 2007 and ABB Robotics. The next version of VSTA (based on Visual known Studio 2008 under the name of " Orcas") will be distributed towards fébvrier 2008. The second version of VSTA is dramatically different from the first, including functionalities qomme the dynamic programming and compatibility WPF, WCF, WF, LINQ, and .NET 3.5.

Objects of VBA

Application (" Applications"),…

In Excel

cell (" Range") (and not " Cells" who is a property), Classeur (" Workbook"), Worksheet (" Sheet"), Graphic (" Chart"), dynamic cross Table (" PivotTable"),…

In Word

August 1st

In Access

August 1st

In AutoCAD (property of Autodesk, Inc.)

August 1st

Remote loading

  • Pages sources VBA

External bonds

  • Office and XML - Development center Site MSDN from Microsoft France
  • Web site of Microsoft on the VBA
  • Which is what VBA (site of Microsoft)
  • VBA: Programming Resources for Visual BASIC for Applications
  • Callback function limitations Limitations of the functions of recalls
  • developpez.com Club of developers VBA

Random links:Peter Phelps | Birr (Argovie) | Cynoglossus | Marc-Antoine Quantin | General service of the Information and Safety | Vale_d'Evesham