VBA Tutorial For Learning Excel VBA from basics to advanced topics. Free VBA tutorial will make you expertise in VBA Automation with Best free tutor.  Our easy to follow tutorials will make you expertise in the subjects which are required for VBA Development. We explain the topics in a smarter way with real-time examples from different domains. You can also  download the Example Macro Files and Learn VBA  with clearly explained code in each topic.

VBA Tutorial: Learning Path

VBA Topics Learning Objective
Introduction to VBA In this topic we will try to understand basics in Excel VBA. What are the different things we can do with VBA?
Getting Started with VBA n this session we will briefly discuss and see the different things which we are required to learn to Record Macros.
VBA Environment VBA Environment we also refer as VBE. You can goto Developr tab in the ribbon and Click on the Visual Basic button to go to the VBE or simply press ‘Alt+F11’ to go to the VBE
Recording a Macro It will take you through how to record a macro in Excel VBA for the following example.
Writing Your First VBA Macro- Hello World! we will see how to write simple Hello World VBA macro. Follow the below steps to do this to show the “Hello World!” message box to the user.
Debugging VBA Code
Accepting Values (Input Box) & Popup Messages (Message Box) Accepting Values and Popup Messages in Excel VBA – In this example we will see how to Accepting Values from user using InputBox and Show Popup Messages to user using MsgBox.
Modifying and Commenting Macros or VBA Code When you are writing the program you may want to test whether particular statement is working fine. Debug Code in Excel VBA is the one of important task while writing programs, it helps you in troubleshooting your code.
Executing a Macro We can execute a macro in many different ways, in this topic we will learn Running macro in Excel: From Macro Dialog and By assigning a short-cut key to the Macro
Macro Security Macro Security in Excel VBA is provided to secure your data or PC from others or from the malicious programs. Learn more about macro security here.
Learn Macros with Examples – 15 Basic Macros for Absolute Beginners These 15 novice macros provides the easiest way to understand and learn the basics of VBA to deal with Excel Objects.
Scope of the Variables When we are working with variables, it is important to understand the Scope of a Variable. The Scope describes the the accessibility or life time or visibility of a variable.
Passing Arguments We write the procedures to perform certain tasks and some times we may required to write another procedure with small variations. In this situation we can take advantage of the Passing Arguments.
Arrays When we work with one item we required to use one variable, if you want work with more than one item, we can go for Arrays in Excel VBA. Arrays are the variables which allow us to store more than one value.
Introduction to Collections Collection in Excel VBA helps to loop through the group of items:
UserForms and Controls Any Windows Application is equipped with set of objects called windows controls. Forms and Controls in Excel VBA topics give you the complete understanding of developing application with Forms and Controls
Events Events in Excel VBA help us to write event enabled programming. In this tutorial we are explaining basic of Event Programming and frequently used events with examples. You can download the example file and explore it.
Objects, Properties and Methods Understanding VBA Objects Properties and Methods in Excel is important, most of the programming languages today are Object Based Or Object Oriented Programming Languages.
VBA Security It is important to understand the macro or VBA Security in Excel if you are dealing with the Macro Enabled Files. It helps to protect your data from the malicious programs and helps to know how to run the macros when its required.
Introduction to ADO and SQL : Connecting to a database with VBA ADO Excel VBA – SQL Connecting to Database Example Macros helps to connect the different data sources from Excel VBA. Select, Delete,Update Records set.
Interacting with Other Applications We can Interacting with Other Applications using VBA- with the MS Office Applications like Word, PowerPoint,Outlook,etc… and other applications like Internet Explorer, SAS,etc.

Latest Excel VBA Tutorials

VBA ActiveSheet – Excel Active Sheet Object

VBA ActiveSheet Object helps to refer the currently activated sheet in the active workbook. We can get all properties and methods of the ActiveSheet using VBA. Let us see the useful of the examples on

Excel VBA ColorIndex

VBA ColorIndex Property of Excel VBA is very useful to set the fill colors, border colors and font colors. Excel VBA ColorIndex returns index values from 1 to 56, -4105 and -4142. You can set

Show or Hide|Unload a userform

Show or hide means to display or hide a Userform. We use Show and Hide methods to display or hide. Unload will be used when completes the task.

Column Number to Column Name

Column Number to Column Name is nothing but converting column number to Excel alphabetic character column name. Most of the time while automating many tasks using Excel VBA, it may be required.

Column Name to Column Number

Column Name to Column Number is nothing but converting Excel alphabetic character column name to column number. Most of the time while automating many tasks it may be required. Please find the following details about conversion of column name to column number. You can also say column string to column number. Or get alphabetic character to column number using Excel VBA.

Remove CheckBox on Worksheet or UserForm in Excel

We can remove or delete checkbox on the worksheet or userform using ‘Go To Special’ or ‘Select Objects’ or by turning on Design Mode in Developer tab. when we don’t want to place checkbox control on the worksheet or userform we removes from there. Please find the more details and screenshots for clear understanding about remove checkbox control in the following chapter.

Add CheckBox on Worksheet or UserForm in Excel

Add CheckBox on Worksheet or UserForm is using checkbox control and is used to specify or indicate binary choice. In this section we will see how to add single checkbox or multiple checkboxes on the worksheet or userform. Please find more details about add checkbox control in the following chapter.

Excel Chart VBA Examples and Tutorials

Here are the top most Excel Chart VBA Examples and Tutorials, show you how to deal with chart axis, chart titles, background colors,chart data source, chart types, series and many other chart objects.

Introduction to Collections in Excel VBA

Collection is an object contains group of objects having similar characteristics (with same properties and methods). For example,if you want to loop through all worksheets in a workbook, you can refer worksheets collection of the workbook and do whatever you want to do with that particular worksheet.

In this topic:
  • Introduction to Collections?
  • Collections in Excel VBA
  • Examples Macro File On Collections

ADO in Excel VBA – Connecting to database using SQL

ADO Stands for ActiveX Data Objects, is Microsoft’s Client-Server technology to access the data between Client and Server. ADO can’t access the data source directly, it will take help of OLE DB Provider to communicate with the data source. Most of the times OLE DB providers are specific to a particular Data Source Type. However, we have an OLE DB provider for ODBC, it is a general purpose provider with help of this ADO can access any Data source which can understand ODBC.

In this topic:
  • What is ADO?
  • What is Database?
  • What is SQL?
  • Practical Learning: Using ADO and SQL with VBA
  • Example File

Events in Excel VBA

Event programming is the most useful tool which helps to monitor specific user actions within Excel. For example, if the user Opening a Workbook, Selects a Worksheet, enters data into a Cell, or saves a Workbook, these actions are all Excel Events.

In this topic:
  • What Are Events?
  • What Are The Different Types of Events?
  • Practical Learning: Workbook_Open Event
  • Example File: Workbook Events, Worksheet Events and Form Events

Procedures in Excel VBA

In this Section:
  • What is a Sub Procedure?
  • Calling a Sub Procedure
  • Procedures and Access Levels
  • Examples on Sub Procedures - With and With Out Parameters
  • Example File

Operators and Operands in Excel VBA

Operators and Operands in Excel VBA very useful concept to programming the tasks. Our free tutorials take you through the concepts with examples .

Variables and Data Types in Excel VBA

Variables and Data Types in Excel VBA are another important concept to write the programs in VBA for automating tasks. Free tutorial to learn with examples.

Excel VBA Object Model

Tutorials for understanding Excel VBA Object Model. Understanding the VBA Object Model is important to deal with different Excel Objects. Learn more here...

Folders and File Handling in Excel VBA

Folder and File Handling in Excel VBA Examples help you to create, delete,copy,move files and folder. And customize File or Folder dialog Box using VBA.

Delete Files Using VBA

Example code for Deleting Files Using Excel VBA by using DeleteFile method of FileSystemObject

Add Clear Comments in Excel VBA

Comments are helpful when you want to show some remarks or comments on particular cell, you can Add Clear Comments in Excel VBA.

Interacting with Other Applications using VBA


We can interact with the other applications using VBA - with the MS Office Applications like Word, PowerPoint,Outlook,etc... and other applications like Internet Explorer, SAS,etc.

In this Section:
  • Introduction?
  • How to interact with MS Word? - Late Binding
  • How to interact with MS Word? - Early Binding
  • How to interact with PowerPoint? - Early Binding
  • How to interact with Outlook? - Late Binding
  • Example File

Getting Started with VBA Programming

Getting Started with VBA - Welcome to VBA programming tutorials, In this session we will see brief introduction of the topic required to understand VBA programming.

VBA Security in Excel

It is important to understand the macro security if you are dealing with the Macro Enabled Files. It helps to protect your data from the malicious programs and helps to know how to run the macros when its required.

In this Section:
  • Understanding VBA Security
  • What are the different Levels of the Security in VBA?
  • How to Enable or Disable the Macros?
  • How To Protect VBA Code?

VBA Objects Properties and Methods in Excel

Most of the programming languages today are Object Based Or Object Oriented Programming Languages. Although Excel VBA is not a truly object oriented programming language, it does deal with objects.

In this topic:
  • What are Objects?
  • What are Properties?
  • What are Methods?
  • What is Object Browser?

Forms and Controls in Excel VBA

Any Windows Application is equipped with set of objects called windows controls. The Main control is called a Form, it is the primary window contains different types of controls which allow user to interact with the computer. The following is a simple form to calculate square value of a given number.

In This Section:
  • What Are UserForms?
  • What Are ActiveX Controls?
  • What Are The Different UserForm Controls & Use?
  • Practical Learning: Developing A Simple UserForm
  • Example File

Write Data to Worksheet Cell in Excel VBA

Description: In the previous post we have seen, how to read data from excel to VBA. We will see how to write data to Worksheet Cell in Excel VBA. Write Data to Worksheet Cell in

Passing Arguments in Excel VBA

We write the procedures to perform certain tasks and some times we may required to write another procedure with small variations. In this situation we can take advantage of the Passing Arguments.

In this Section:
  • What are By Value (ByVal) and By Reference (ByRef) Passing Arguments?
  • Writing a procedure or a function with Arguments
  • How to call a function or a procedure?
  • Example macro file to explain passing arguments

Change Font Color in Excel VBA

Examples will show you how to change Font Color in Excel using VBA. While preparing the reports we change the font colors based on data Or a template.

Arrays in Excel VBA

When we work with one item we required to use one variable, if you want work with more than one item, we can go for arrays. Arrays are the variables which allow us to store more than one value.

In this topic:
  • What is an Array?
  • What are the different types of arrays?
  • One Dimensional Array:
  • Multi-Dimensional (Two Dimensional) Arrays:
  • How to Re-size an Array?
  • Array Options
  • Example File

Delete Rows and Columns in Excel VBA

We can delete rows in Excel using VBA. We can specify a condition to delete. There are number of examples to show you dealing with deleting records in Excel

Scope of Variables in Excel VBA

When we are working with variables, it is important to understand the Scope of a Variable. The Scope describes the the accessibility or life time or visibility of a variable. There are four levels of Scope:

  • Procedure-Level Scope
  • Module-Level Scope
  • Project-Level Scope
  • Global-Level Scope

Excel VBA Macros for Beginners – 15 Examples File download

learn-vba-by-examples

Learning Basic Excel VBA By Examples is the easiest way to understand the basics of VBA to deal with Excel Objects, in this tutorial we will not covering any programming concepts, we will see how to access the different Excel Object using VBA.

Latest  VBA Tutorials