What is Excel VBA? : Excel VBA Basics 001

Visual Basic for Applications (VBA) in Excel, is a powerful and sophisticated built-in programming language that allows you to write your own functions or commands in an Excel spreadsheet.

These custom functions or commands, can help to ease your tasks and thus by using Excel VBA you can do almost any imaginable thing in Excel.

Now, before we dive deep into Excel VBA, let’s first try to understand what VBA is.

What is VBA?

In most simple terms you can also say that, VBA is the language that Office Applications like Excel, Word, PowerPoint, etc. understand. So, all the programming that we are going to do in Excel or in other office application has to be done in VBA.

But technically, VBA is an implementation of Microsoft's event-driven programming language i.e. VB6 and its associated integrated development environment (IDE).

Excel VBA

VBA is an extensible programming language that is made up of a core set of commands and extended on a per-application basis to be able to work directly with objects in that application. And because of this it is sometimes also called as a hosted language.

Visual Basic for Applications is bundled with office applications (host application) so that it can be used as medium for accessing and interacting with the host applications object model. This means that, Excel VBA, knows about things like workbooks, worksheets, cells and charts, but Word VBA doesn’t knows about such things. Instead Word VBA understand terms like documents, bookmarks etc., things that are more related to Microsoft Word.

Is there any difference between a VBA Program and Macro?

I have seen many people confusing between VBA and Macro language. But a Macro language is very much different from a VBA. Macros were used with the older versions of office applications and they could only be used for automating instructions.

In fact, the first spreadsheet macro programs were just shortcuts for the user interface commands. For example, if in the user interface you typed R (for “Range”), N (for “Name”), and C (for “Create”), you would enter RNC into the macro to automate the process.

This approach was intuitive, but it also had integral weaknesses. Because of such weaknesses, VBA later in 1993 replaced this Macro Language, and hence there is still a misconception among people to call VBA as macro language.

Visual Basic for Applications when compared to traditional Macro Language is more powerful and sophisticated and hence it was an instant success.

Why learning Excel VBA is so important?

As you become familiar with Excel, you will notice that although Excel provides you large number of tools, but still it doesn’t have everything that you need to perform your daily tasks. Such tasks may include creating custom functions, repetitive instructions, automating tasks etc.

And hence Microsoft has provided VBA as a gap filler; that allows users to write their own methods or commands to perform their tasks.

After having enough experience with VBA programming in Excel you will never ever get stuck during your tasks due to a lack of built-in tools. Using Visual Basic for Applications you will be able to write your own function and commands whenever you feel the need to write one.

What all you can do with Excel VBA?

With Excel VBA you can do a lot of things in Excel. I have enlisted few of them below:

  • You can automate the tasks that you have to do frequently.
  • You can create a custom command in excel.
  • You can repeat a set of instructions multiple times.
  • You can create custom function popularly called as User Defined Function (UDF)
  • You can create a custom add in in Excel.
About Content Studio

Thanks for reading. If you have found this article helpful show your love by sharing it with your friends & colleagues. All the tutorials on the Excel Trick are produced, reviewed, and fact-checked by a team of experts. You can check out our team here.