Visual Basic for Applications
When thinking about Visual Basic for Applications ('VBA') the first thing which
you might think of is Microsoft Office. That's because although VBA was designed
to enhance applications in general, it was soon primarily used within the Microsoft
Office suite to provide a programming environment which could easily surpass the
previously used macro language(s).
Unfortunately it's also a language which seems highly underappreciated and sometimes
even misunderstood. And so I figured I'd setup an advocacy page.
This page was last updated on:
13 Dec 2016
Basic for beginners only?
Many people don't think too highly about the Basic language, probably because it
started out to help people learn more easily how to program a computer. It's even
in the name itself, BASIC is an acronym which stands for "Beginners
All-purpose Symbolic Instruction Code".
Of course that's also ignoring the fact that at this time it's by far the
language it once was. Even Microsoft's Visual Basic has eventually evolved
and found its place as a full fledged Object Oriented ("OO") language
within the .NET framework. Unfortunately many people think back to the times
of the Commodore 64 when talking about Basic.
And with that in mind it's only logical that some people come to conclude that if
we're talking about a Basic variant which is even constrained to a single application
then surely it has to be pretty limited in the things it can do?
VBA being mis-understood (and under appreciated)
Take Wikipedia. If you check out the
VBA article on the Dutch Wikipedia site it mentions (quote):
"Het zwakke punt van VBA is het gebrek aan kracht in de taal, en de vaak
zeer gebrekkige set "objecten" die applicaties en VBA zelf aanleveren. Dit is
echter enorm afhankelijk van de applicatie waarin VBA draait: zo biedt VBA in
Excel & Access veel meer mogelijkheden om in interactie te treden met de
geopende spreadsheet of database dan pakweg VBA in Powerpoint."
This translates to:
"VBA's weak point is the lack of strength within the language, and the often
extremely limited set of "objects" which are provided by both the
applications and VBA itself. However, this is very depending on the application
in which VBA operates: Within Excel or Access VBA provides much more possibilities
to interact with the opened spreadsheet or database than VBA within Powerpoint."
Which, in my opinion, clearly shows the lack of understanding which many people have.
After all; it's also fair to say that Excel can perform much more (mathematical)
operations than PowerPoint can. Excel is used to process data
whereas PowerPoint is aimed at showing (static) data, usually in the form of slideshows.
Surely it shouldn't come as a surprise that this also means that there is a significant
difference in the functionality of both programs.
And because VBA mainly operates within the scope of the host application it should
be obvious that this difference in functionality also reflects back on it. Yet as you can
read for yourself some people would rather "blame" VBA instead of looking at the
host application. Which, in my humble opinion, basically show their own ignorance.
More advocacy to follow later..