Advantages of using Visual Basic for Applications over Macros

Microsoft Access allows users to easily create and manipulate databases. While it has many useful features, there are times when you have to customize certain tasks due to functionality requirements. Due to this, many users resort to using Macros.

Macros are a set of stored commands. Usually repetitive tasks can be locked down in macros and associated with a command button. Clicking this button will execute those commands. This is a simple way to achieve your goals, but there is an efficient way that will benefit you more in the long run that involves using Visual Basic for Application (VBA).

Speed – Macros are fast when the number of commands is less in number. VBA is more adept at handling longer and more complex instructions efficiently. Speed is an important factor because clients are not very forgiving when they realize they have a slow piece of software in their hands.

Functionality – The number of actions are limited when it comes to macros. VBA has superior functionality, which includes cross-application support. For example, in a case where you prepare an invoice, the customer’s name can be picked from a table, cross referenced with Outlook’s address book and an email sent all without any prompting from the user.

Control – When activated, macros have to run their course. They are more like batch files in that sense. VBA code will give you control over each step and can be customized for individual users.
In conclusion, VBA is not the solution for every problem but it can make many tasks easier and more efficient. A combination of Macros and VBA used prudently, will yield the best results.

This entry was posted on Saturday, February 13th, 2010 at 9:25 am and is filed under Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply