Visual Basic for Applications - VBA For Excel

Excel, like Visual Basic, experienced several revisions during the 1990s, roughly in-line with the changes to the Windows operating system, but Excel 5, released in early 1994, included the first version of VBA. This was a big step forward for VBA was intended to unify the programming code behind the Microsoft Office application program suite. Office was originally released to run on Windows 3.1, and contained a suite of programs including: Word, Excel, Outlook and Access.

Following the early success of VBA, Microsoft decided to incorporate VBA into Access (the database application). By the time Office 97 was released, VBA had made its way into four of the five Office applications: Word, Access, Excel and PowerPoint. The fifth Office 97 application, Outlook contained VBScript a variant of the Visual Basic language widely used for Internet applications.

VBA is a programming language created by Microsoft that can be built into applications. For example, VBA for Excel is a programming language that is contained within Excel. It primary purpose is to enhance and automate applications that use Excel. VBA is based on the stand-alone Visual Basic language but works within some other Microsoft application.

There are many advantages for incorporating VBA into applications.

  • Given the diverse requirements and demands of end users, it is often almost impossible for off-the-shelf applications to deliver 100 percent of user requirements. VBA can often complement the facilities within the software application often offering a better solution.
  • Applications that host the VBA language can be customised to meet user requirements and integrated with other VBA enabled applications on the desktop. Thus, Microsoft Office applications share a common tool for customization with VBA.
  • Solutions created with Visual Basic for Applications execute faster since they run in the same memory space as the host application and are tightly integrated with the application.This allows developers to write code that responds to user actions, such as when a user opens, closes, saves and modifies documents or projects.
  • VBA is highly compatible with Visual Basic.VBA is built from the same source code base as Visual Basic; therefore providing a high level of compatibility.VBA also uses the same high-performance language engine and programmer productivity tools as VB.
  • VBA is becoming ubiquitous in the programming community For VBA is a language found in both Microsoft and non-Microsoft products. Indeed, the number of third-party software vendors who are licensing VBA to run with their products is growing rapidly.

VBA Excel version compatibility

When Microsoft introduced Excel 97, some radical changes to both the language and the developers interface were made. Excel 97 was the first time that Active X components could be embedded with worksheets and user forms.Compatibility with previous versions of VBA is far less likely than with versions released after Excel 97. At the time of writing this book, these include Excel 2000 and Excel XP. The VBA macros written in this book should work with versions of Excel 97 onwards. However, sometimes reference will be made to commands that were developed for Excel 5.

VB and VBA

VBA is not to be confused with Visual Basic; Visual Basic is a stand-alone program that runs independently.VBA, on the other hand, is part of an Office application, and therefore cannot work without the Office application. For example, VBA for Excel is part of the Excel program, and cannot run without Excel. There are many similarities in the language constructs however, and as already stated VBA is highly compatible with VB.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

VBA For Excel Topics