October Sale - 20% of all courses - Book Today

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.8/5
Over 23577 Reviews
Excellent training course really filled in the gaps for me as a SharePoint administrator -SharePoint Site Owner Brisbane
Kristy - SharePoint Site Owner, .
Great course with very useful content. But also made me realise that Sharepoint is a massive tool with endless capabilities. -SharePoint Site Owner Brisbane
Richard - SharePoint Site Owner, .
Very good -Office365 Beginner Brisbane
Liem - Office365 Beginner, .
Great training - really good pace and so clear - enjoyed this training very much and learnt more than I knew before Thanks -Excel Customised Remote Online
Tricia - Excel Customised, .
Fantastic -Excel Customised Remote Online
Angie - Excel Customised, .
Learnt a lot thank you -Excel Customised Remote Online
Ann - Excel Customised, .
Amazing Trainer very patient and took the time to go through things thoroughly. Thank you Jason -Excel Customised Remote Online
Carly - Excel Customised, .
Very well structured course, easy to understand and follow. Highly recommended !! -Power BI Intermediate Sydney
Josep - Power BI Intermediate, .
Insightful Training. Trainer extremely helpful and took time to sort out any issues on the program. Trainer offered extra tuition if required. Trainer clear and concise in explanation. -Power BI Intermediate Sydney
Aishling - Power BI Intermediate, .
It is a good course. I learned a lot from this. Thank you -Power BI Intermediate Sydney
Eric - Power BI Intermediate, .
Very engaging, enjoyed and learned a lot. -Power BI Intermediate Sydney
Roman - Power BI Intermediate, .
Jagg teach method made the day very informative and interesting. Would have liked some notes to take away on tips and tricks. -Power BI Beginner Adelaide
Allison - Power BI Beginner, .
Very, very good. Extremely knowledgeable, very good communication, loved the hand gestures. -Power BI Beginner Adelaide
Rhett - Power BI Beginner, .
Extremely insightful and very helpful. For someone who has not had a lot of exposure to Power BI, I now feel quite confident with the basics of the program. -Power BI Beginner Adelaide
Ryan - Power BI Beginner, .
Jagg was excellent and have a good sense of humer!!. Learned a lot. Thanks Jagg. -Power BI Beginner Adelaide
Hikkaduwa - Power BI Beginner, .
Great introduction to Power BI, easy to follow along with, lots of good insight and well presented. Instruction was clear and good examples provided. -Power BI Beginner Adelaide
Linda - Power BI Beginner, .
great overview of the building of beginner power BI reports and dashboards. cant wait to build more reports -Power BI Beginner Adelaide
Louise - Power BI Beginner, .
That was very informative and well paced. Thank you -Power BI Beginner Adelaide
Hina - Power BI Beginner, .
Excellent course, Jagg was very informative and clear - thank you -Power BI Beginner Adelaide
Emma - Power BI Beginner, .
very knowledgeable -Office365 Beginner Brisbane
David - Office365 Beginner, .

Trusted by Business

south east asia microsoft training courses nexacu

Follow us