Macro language based on Visual Basic. Used in all the Microsoft Office suite, it was developed by Microsoft to provide programmers an easy, universal language to write malicious macro viruses such as Melissa.


I find Visual Basic for Applications intriquing since not only did it replace application specific macro programming languages, it gave rise to the first cross platform virus; this came to most peoples attention in the form of the MS Word conceptvirus.

Not only was this the first virus that could be distributed my email, this was the first known virus that could propogate from PCs to Macs; before this virus' were platform specific, infecting their hosts only at the very lowest levels of the system.

The original implementation of this virus was benign, the anonymous author choosing to only create a stub named, appropriately enough, payload, with the terse but suggestive comment "that's enough to prove my point".

And make a point he did! A entire generation of script weenies have seized upon M$ usual bullshit buggy and security free implemenation of what is otherwise a good idea, to create a whole universe of derivative - not to mention destructive - viri.

And Microsofts solution? Rather than do it the right way, creating a virtual machine with an intrinsic security mechanism inside applications where said VBA executes (gee, does this sound familiar?) they now offer a modal dialogue box to the user, advising her to turn off macros.

Elegant.
Visual Basic for Applications is an automation framework based on Microsoft's COM specification. It exposes internal methods and procedures of many Office and Office-like applications. You can expose any application to Visual Basic, JScript, even Perl or Python by calling the IDispatch COM object in Windows.

Many applications have exposure to scripting (Netscape has JavaScript, Apple apps can have an Applescript Dictionary, which exposes their methods to AppleScript). The advantage of this is to provide third party extensions to your product. Currently, the MS apps that provide this kind of extensibility are Visio, Word, Excel, Powerpoint, Access, Outlook, and Project (among others). There are many problems with this exposure, including Macro Viruses which can cause much damage if they are allowed to be executed in such a fashion.

Visual Basic for Applications is accessed through the Visual Basic Editor IDE (VBE), which is provided with all of the Office apps.

Let me clear up a very common misconception--Visual Basic is not itself a language. Visual Basic refers to an IDE that Microsoft sells. VBA is the actual language part of the very confusingly named pantheon of Visual Basic tools. VB the IDE is just another program that exposes methods through COM automation and which supports its own version of VBA, just like Office apps do. When people say "Visual Basic", they are technicaly referring to just the IDE when they might well be meaning to refer to the actual language itself. I guess this is what happens when there's no standard for a language...

Log in or register to write something here or to contact authors.