Please note javascript is required for full website functionality.

Blog

VBA Blogs: Going Through the Visual Basics – Part 4

24 August 2018

We thought we’d run an elementary series going through the rudiments of Visual Basic for Applications (VBA) as a springboard for newer users. This blog looks at the basic principles of VBA.


Macros are organised and stored in the following way in VBA. The following common items are the principal components we need to know.

  • statement is a single command or action in a macro – that is, it's a line of code.  For example, Range("B3").Select is a statement.  If we think of VBA as a language, think of a statement as a sentence
  • procedure is, essentially, another way of referring to a macro, although there are other types of procedures as well, such as functions.  A function is a procedure that returns a result
  • module is a collection of code.  Think of a module as a code document.  A module can contain several procedures.  Like documents, modules can be saved as files, copied and shared
  • project is the collection of all modules and related VBA objects in our document, template or add-in.  A project might have one or several modules, as well as other elements such as UserForms (dialog boxes).



Newsletter