What is VBA and Macro in Excel?

VBA stands for Visual Basic for Applications. It is associated programming language from Microsoft which is currently used with Microsoft office applications like MS-Excel, MS-Word and MS-Access. Here I will teach you the fundamentals of VBA. Every of the sections contain connected topics with straightforward and helpful examples.

Application of VBA and Macro in Excel

You may get surprised about what is the necessity of using VBA in MS-Excel. I will tell you there are many inbuilt functions in Excel which are always not sufficient sometimes. As an example if I need to insert a button to run a different program in a sheet then I need to use VBA.

Where to start VBA and Macro in Excel?


You might have little confused after deciding to learning VBA that where to start VBA? It stands for Visual Basic for Applications. It’s a programming language introduced by Microsoft with Excel, Word and Access applications.

It helps programmers to customize and develop their application.

If you have already heard about VBA and you are thinking that where to start then start from here.

1. Go to FILE.

2. Click on Options

3. Click on Customize Ribbons in Excel Options window.

4. Click on the Developer checkbox as shown in above screenshot.

Now see the Developer Tab is ready for exploring VBA and Macro in Excel.

Now I will make an introduction to VBA editor. Click on the Visual Basic button at left of Developer tab or press Alt+F11.

A small Macro code example.

Insert a button from developer tab and edit macro.

Now this window will appear when you put a button on sheet. Click on New button to assign a new macro code to that button.

Now you will get the VBA editor window.

Now I will type a small macro code here to show a message box when click on the button.

Sub Button1_Click()
MsgBox (“Hello World”)
End Sub