All courses available in-class or via remote login

Visual Basic terminology

Excel VBA Terminology

January 25, 2018

Excel VBA

Visual Basic for Applications is a derivative of the programming language Visual Basic. Each Office application has its own particular kind of VBA depending on the objects and operation of the application. For example, Microsoft uses worksheets while Microsoft Word works with documents. The following notes explain some of the key concepts in VBA programming.

Object Orientated and Procedure Driven

Visual Basic for Applications and Visual Basic are both object-orientated programming languages because they work with objects. Most of these objects appear on the screen, hence the term ‘visual’. They are also procedure-driven languages using commands and structures from the BASIC programming language to bind object statements into workable applications.

Objects, Properties, Methods and Events

In VBA an object is anything in an application that you can see and manipulate in some way. For example, you can manipulate a worksheet by adding rows, deleting columns, displaying gridlines, and so on. A worksheet is therefore an example of an object. Rows are also objects, as are columns too. These are child objects of the parent object – the worksheet. This way of organizing objects into a hierarchy is known as an object model.

Manipulate objects 1 of 3 ways:

  • Change the way an object looks or behaves by changing its properties
  • Make an object perform a task by using a method that is associated with the object
  • Run a procedure whenever a particular event happens to an object=

Objects therefore have properties, methods and events.

Real World Example…

Let’s look at a simple real-world analogy to get a better idea about objects, properties, methods and events. Consider a car: it is an object because you can see it and manipulate it. Its:

  • Properties are its physical characteristics such as its make, model, colour and so on
  • Methods define what you can do with the car such as reversing, accelerating, turning, stopping and so on
  • Events are the actions that happen to the car that generate an automatic response from the car. For example, if you remove the keys from the ignition while the car’s headlights are on (event), most cars will sound a warning alarm or turn off the lights (response).

The Active Object

In VBA, active describes the object item that you’re currently working on.

For example, the worksheet cell that you’re editing or formatting in Excel is the active cell. The workbook that you are currently working on is said to be the active workbook. The object that is currently active is said to have the focus.

This is an important concept to understand because most of your VBA programming will be performing an action on a particular object. If you don't identify that object correctly, you may find that Excel shifts focus behind the scenes to a different object and your program will fail.

If you would like to learn more about our Excel VBA courses click here.

Contact Us

What is Remote Training?

Valued by Individuals

4.72 / 5
Over 26910 Reviews
Good session. Keen to learn more as I already knew some stuff. -MS Teams Brisbane
Karin - MS Teams, .
Very informative Would be good to have a booklet to review what was learnt in the course Steven to follow up on Power BI booklet for Melina Berthaux -MS Teams Brisbane
Melina - MS Teams, .
Good course, the afternoon was more relevant for me. The morning was more of a referesher -MS Teams Brisbane
Colin - MS Teams, .
happy with outcome. -MS Teams Brisbane
Wayne - MS Teams, .
Course was presented at a good pace and kept us interested. Steven was a good trainer and kept the group included and ensured we all kept up. -MS Teams Brisbane
Tammy - MS Teams, .
Presenter was clear and concise and knowledgeable -MS Teams Brisbane
Kevin - MS Teams, .
Good training with a knowledgeable trainer. -MS Teams Brisbane
Emma - MS Teams, .
Another great session, thanks to Jason for taking us through more functions of Power BI. I feel much more equipped to use the program for my work now. -Power BI Intermediate Brisbane
Bek - Power BI Intermediate, .
Good refresher -Excel Intermediate Brisbane
Shani - Excel Intermediate, .
Great class - I picked up some really good tricks and methods. -Excel Intermediate Brisbane
Melinda - Excel Intermediate, .
learnt a lot from Stuart, looking forward to the advance course -Excel Intermediate Brisbane
Andrea - Excel Intermediate, .
Great course, learned heaps! Good pace. Easy to follow online. -Power BI Intermediate Brisbane
Ashleigh - Power BI Intermediate, .
Found that the Intermediate course was great as a refresher but I did learn some great tips. -Excel Intermediate Brisbane
Suzanne - Excel Intermediate, .
Great building on the beginner course and some amazing things possible. Jason as always is excellent!!! Friendly, responsive to questions. Good resources to link into as well. Thanks very much -Power BI Intermediate Brisbane
Clea - Power BI Intermediate, .
This course was very good for me I learned a lot in the class today -Excel Beginner Sydney
Debra - Excel Beginner, .
I really enjoyed learning from Michael and will definately use what I have been taught. An excellent and approachable way to learn Excel. Thank you! -Excel Beginner Sydney
Marcia - Excel Beginner, .
Michael was very attentive and helpful. He kept pace and time for the course but was always happy to assist anyone needing help. The course itself was a great refresher and I am looking forward to returning for an Intermediate Excel course to further my skills. -Excel Beginner Sydney
George - Excel Beginner, .
Michael was very helpful and made it fun. -Excel Beginner Sydney
Melissa - Excel Beginner, .
I found this course informative and easy to understand -Excel Intermediate Melbourne
James - Excel Intermediate, .
Great course, thanks -Excel Intermediate Melbourne
Jake - Excel Intermediate, .

Trusted by Business

Procured by Government

Awards and Accreditations

Nexacu offices Australia

Follow us