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.8/5
Over 25168 Reviews
Good training and easy to follow. -Word Intermediate/Advanced Brisbane
Esther - Word Intermediate/Advanced, .
Course covered Intermediate and Advanced areas. Excellent presentation and interesting. Presenter was not only interesting and knowledgeable but also considerate and helpful. Highly recommended. -Word Intermediate/Advanced Brisbane
Deborah - Word Intermediate/Advanced, .
Great session, very helpful, excellent trainer. enjoyed this training :). Thank you -Word Intermediate/Advanced Brisbane
Lian - Word Intermediate/Advanced, .
Very engaging and knowledgeable presenter, material was new to me and will be useful, examples/scenarios helps illustrates the tools/capabilities very well. -Word Intermediate/Advanced Brisbane
Linda - Word Intermediate/Advanced, .
Steven is a great trainer. This is the second session that I have attended with him. I highly recommend him to others. Thanks Steven, that was a great session! Really appreciate it! Cheers. -Word Intermediate/Advanced Brisbane
Nawaaz - Word Intermediate/Advanced, .
Thank you! -Word Intermediate/Advanced Brisbane
Crissy - Word Intermediate/Advanced, .
The training was informative. I learnt a lot of information. Trainer was very knowledgable. -Word Intermediate/Advanced Brisbane
Umi - Word Intermediate/Advanced, .
Excellent session that covered all our needs and given lots of other information that will be helpful to save time. -Word Intermediate/Advanced Brisbane
Katrina - Word Intermediate/Advanced, .
Very good and learnt lots of shot cuts. -Word Intermediate/Advanced Brisbane
Nirmalie - Word Intermediate/Advanced, .
Thank you, I did learn quite a few things. -Word Intermediate/Advanced Brisbane
Sean - Word Intermediate/Advanced, .
Jason is a good instructor. Knows his stuff and goes in depth. I would suggest changing the course content to mention that this course is mostly around coding as it might help the user prepare a bit better... would have helped me :) Also, as I have done all 3 office 365 courses, one thing I have felt was that it could be worth starting the course or even before starting the course, asking the user to give 1 scenario that they face. This would be helpful as a practical application in each class to make it more personal for the user. The instructors did do this to a degree but i think if you specifically got a scenario, it would be even better. Over all i'm happy, there's so flippen much to learn. thanks :) -Office365 Advanced Canberra
Emma - Office365 Advanced, .
Incredible - the course was great and has lots of practical application to our organisation to help streamline our processes. Many thanks Jagg! -Power Automate Adelaide
John - Power Automate, .
Liked having the 1hour break in the middle to catch up on work emails! -Office365 Advanced Canberra
Annie - Office365 Advanced, .
The trainer was very patient and I really let a lot from today's session. It just tied up all my previous information I had learnt into a more formal approach. -Power BI Beginner Melbourne
Jillian - Power BI Beginner, .
I had a lot of trouble logging in remotely and missed quiet a bit of the beginning of the course, John was very patient and walked me through in his lunch time - very much appreciated. -Power BI Beginner Melbourne
Sharyn - Power BI Beginner, .
great session -Power BI Beginner Melbourne
grace - Power BI Beginner, .
How to create data visualisations and also I gained a clear understanding of where the data comes from. Thank you -Power BI Beginner Melbourne
Siobhan - Power BI Beginner, .
Small classes and helpful teacher made for great learning environment -Excel Beginner Brisbane
Stephen - Excel Beginner, .
Good introductory training. -Excel Beginner Brisbane
Matthew - Excel Beginner, .
Ken was very clear and directive, answering and assisting with all questions, including being very patient. Taking the time to ensure that all our expectations were met. Great teacher, making the experience a great learning process. Thank you. -Excel Beginner Melbourne
Kerri - Excel Beginner, .

Trusted by Business

Procured by Government

Awards and Accreditations

Map of Australia

Follow us