0% found this document useful (0 votes)
10 views6 pages

Vba Excel 1

VBA stands for Visual Basic for Applications, an event-driven programming language from Microsoft. It is now predominantly used with Microsoft Office applications such as MSExcel, MS-Word and MS-Access. This tutorial teaches the basics of VBA. Each of the sections contain related topics with simple and useful examples.

Uploaded by

ae.wongkene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views6 pages

Vba Excel 1

VBA stands for Visual Basic for Applications, an event-driven programming language from Microsoft. It is now predominantly used with Microsoft Office applications such as MSExcel, MS-Word and MS-Access. This tutorial teaches the basics of VBA. Each of the sections contain related topics with simple and useful examples.

Uploaded by

ae.wongkene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

VBA EXCEL

VBA stands for Visual Basic for Applications, an event-driven programming language from
Microsoft. It is now predominantly used with Microsoft Office applications such as MSExcel, MS-
Word and MS-Access. This tutorial teaches the basics of VBA. Each of the sections contain related
topics with simple and useful examples.

Audience
This reference has been prepared for the beginners to help them understand the basics of VBA. This
tutorial will provide enough understanding on VBA from where you can take yourself to a higher
level of expertise.

Prerequisites
Before proceeding with this tutorial, you should install MS Office, particularly MS-Excel.

VBA - Overview
VBA stands for Visual Basic for Applications an event-driven programming language from
Microsoft that is now predominantly used with Microsoft office applications such as MSExcel, MS-
Word, and MS-Access.

It helps techies to build customized applications and solutions to enhance the capabilities of those
applications. The advantage of this facility is that you NEED NOT have visual basic installed on
our PC, however, installing Office will implicitly help in achieving the purpose.

You can use VBA in all office versions, right from MS-Office 97 to MS-Office 2013 and also with
any of the latest versions available. Among VBA, Excel VBA is the most popular. The advantage of
using VBA is that you can build very powerful tools in MS Excel using linear programming.

Application of VBA
You might wonder why to use VBA in Excel as MS-Excel itself provides loads of inbuilt functions.
MS-Excel provides 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.
VBA - Excel Macros
In this chapter, you will learn how to write a simple macro in a step by step manner.

Step 1 − First, enable 'Developer' menu in Excel 20XX. To do the same, click File → Options.

Step 2 − Click ‘Customize the Ribbon’ tab and check 'Developer'. Click 'OK'.
Step 3 − The 'Developer' ribbon appears in the menu bar.

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.

Step 6 − Perform a right-click and choose 'properties'.

Step 7 − Edit 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.

Private Sub say_helloworld_Click()


MsgBox "Hi"
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 further chapters, we will demonstrate using a simple button, as explained from step#1 to
10. Hence , it is important to understand this chapter thoroughly.

You might also like