What VBA Is and What VBA Is Not

The first thing that differentiates VBA from Visual Basic is the fact that VBA is designed to function as a macro language, whereas Visual Basic is designed as a way of creating applications and program components. VBA cannot create compiled executable code like Visual Basic. VBA projects can only run within their host application. For example, if a VBA project is created to work with Excel (its host application), then it can only be executed within the Excel application.

So what can VBA do, and what is it used for? VBA is used to enhance or extend its host application in some way, such as adding new functions to Excel or changing Word's menu structure by adding new options or removing the ones you don't want to see. VBA can also be used to facilitate communication and interoperability between applications that support VBA. For example, you could use VBA to read an Access database and transfer that information to a Word document. The possibilities are endless.

Top Home