What is Excel VBA?
- Excel VBA is a programming language, that stands for Visual Basic for Applications.
- This language is pre-installed with Microsoft Excel. It is a very powerful programming language that allows us to automate the daily repeating task in Microsoft Applications such as MS Excel, MS Word, MS Access, MS Outlook, MS PowerPoint, and Many More.
- With the help of Excel VBA, we can build customized applications and solutions to enhance the capabilities of these applications.
- We can use VBA in all office versions, which starts from MS Office 97 to MS Office 2019 or with any available latest version.
Why We Should Use Excel VBA?
- VBA is very easy to learn and required very basics programming skills to implement.
- VBA enhances the functionality of excel or MS Office Application by allowing us to automate the daily routine task according to our needs.
- It uses simple English statements to write the lines of code.
- With the help of VBA, we can design a GUI(Graphical User Interface) as per our needs.
VBA Editor
- The initial step to working with VBA in MS-excel is Visual Basic Editor also called VBA Editor, VB Editor, or VBE Editor.
- Visual Basic Editor is an in-built application. It’s a part of MS Excel and opens whenever we are opening an Excel workbook. By default, it’s not visible, we have to activate VBA Editor to access and use it.
- Visual Basic Editor is a very mesmerizing tool if we love to do automation.
- With the only help of the VBA Editor, we can design our Project.
How To Access the VBA Editor
There are several ways to access or open the Visual Basic Editor in Excel by Using:
- Developer tab.
- keyboard shortcut (Very Easy & Fast),
- Worksheet tab,
1.By Using the Developer Tab:
**This is the Mandatory setting which we have to do.
For Accessing the Developer tab first we have to enable this option from MS Excel settings.
Step 1: Click on the File menu which is available in the left corner of the Excel Workbook.
Step 2: Now Click on the Options button which is available at the bottom of the left corner of the Excel Workbook.
Step 3: Click on the Customize Ribbon then Enable the Developer checkbox and Click on OK.
Step 4: Now we can able to see the Developer Tab in Menu options.
After That, we can click on Visual Basic caption to open the VBE Editor or we can use the shortcut key.
2.With a keyboard shortcut:
Hold the Alt key and press the F11 key (Alt + F11) at the same time then the VBA editor Window will be visible.
These shortcut keys work as a toggle. However, when we use this shortcut again, it will hide the VBA Editor.
NOTE: For Mac OS we have to use Opt + F11 or Fn + Opt + F11.
3.By Using the Worksheet Tab:
Step 1: Select the Worksheet tab.
Step 2: Right-click on the tab.
Step 3: Then, Click on the View Code option.
Now VB Editor is Visible on Screen.
Congratulations!! Now You have an understanding regarding Excel VBA introduction!!
Next Chapter: Create a Macro