VBA ─ Overview
VBA stands for Visual Basic for Applications an event-driven programming language from Microsoft that is now especially used with Microsoft office applications such as MS-Excel, MS-Word, and MS-Access.
It helps to build customized applications and solutions to reach out the abilities of those applications. The advantage of this facility is that you NEED NOT have visual basic application installed on our desktop or Laptop, however, installing Office will help from complicacy in achieving the purpose.
Right from MS-Office 97 to MS-Office 2013, you can use VBA in all office versions,with any of the latest versions available. Among VBA, Excel VBA is the most popular. The benefit of using VBA is that you can create very powerful tools in MS Excel using linear programming.
MS-Excel provide only basic inbuilt functions which might not be sufficient to
perform complex calculations. Under such circumstances, VBA becomes the most obvious solution.
For example, it is very hard to calculate the monthly repayment of a loan using Excel's built-in formulas. Rather, it is easy to program a VBA for such a calculation.
Accessing VBA Editor
In Excel window, press "ALT+F11". A VBA window opens up as shown in the following
screenshot.
Watch Video to Understand this Post
VBA ─ Excel Macros
So guys this is the window where we are going to learn VBA. In this guide we cover the basics in a easy-to-understand manner, perfect for the absolute beginner. you will learn how to write a simple macro in a step by step
Step 1: click File -> Options to enable 'Developer' menu in Excel application.
Step 2: Click ‘Customize the Ribbon’ tab and check 'Developer'. Click 'OK'.
Step 3: The 'Developer' ribbon appears in the menu bar. Go to developers tab to access the vba options.
Step 4: Click the 'Visual Basic' button to open the VBA Editor.
Step 5: Start scripting by adding a button. Click Insert -> Select the button. Click on Excel where you want to show the button.
Step 6: do a right-click and choose 'properties'. From dropdown menu.
Step 7: Edit and change the Name and Caption as shown in the following screenshot.
Step 8: Now double-click the button and the sub-procedure outline will be displayed as shown in the following screenshot.
Step 9: Start coding by simply adding a message with Msgbox.
Private Sub Greetings_Click()
MsgBox "Hi Learner"
End sub
Step 10: Click the button to execute the sub-procedure. The output of the sub-procedure is shown in the following screenshot.
Note: In Next post, we will demonstrate using a simple button, as explained from
step#1 to 10. Hence , it is important to understand this session thoroughly.
Scroll down to Click Next Post












































