Learning VBA

Interesting post (and comments) over at Daily Dose of Excel (referencing another post). Basically saying that people should be learning and using (a bit of) VBA, as part of their basic efficiency/productivity – assuming they use Office apps, of course. For example, you wonder how many people copy-and-paste quantities of data manually (probably making mistakes) on a regular basis, when a few lines of code would do it for them.

Unfortunately, it is part of our culture that programming is regarded as something terribly technical and obscure, not for ordinary people. Microsoft themselves are at fault for putting ever more layers of user interface in front of the application functionality. Lots of PC users do not know what a Command Prompt is. I admit that VBA as a language is a bit quirky and inconsistent (the Set Keyword, for example), but it’s not unusable.

There’s a similar issue over in the domain of XML documentation. There are technical writers (‘technical’, note) who feel that everything should be entirely wrapped up in a GUI. This might be feasible if you are prepared to do what the tools let you do, and nothing else. But I think having some knowledge of the underlying languages is helpful.

It also allows you to use the many free tools, which tend to be light on GUIs. For example, a set of XML document files on disk can be queried (and even updated) using the XQuery language, effectively turning the files into a content database. XQuery is a very clean, functional language, with a SELECT-like construct to do the querying (much easier than VBA!). There are free (versions of) tools that index files and run queries.

So, yes, I think that there should be greater encouragement for ‘serious’ users of tools to roll their sleeves up and get into some (gentle or not so gentle) programming. At least they’d appreciate a bit more what developers do!


2 Responses to “Learning VBA”

  1. 1 Redge November 26, 2009 at 2:57 pm

    Learning VBA at any level will allow users to better appreciate how powerful Excel is. The people I work with have experienced the “wow” factor more than once.

    The appetite for learning more is encouraged by an effective introduction to the subject of VBA.

    VBA terminology can be confusing. Use what I call “Incubation Theory”, in other words, give it time to sink in before hatching into something new.

  2. 2 Roy MacLean November 26, 2009 at 3:13 pm

    Thanks, Redge.

    Yes, the VBA terminology is a pain (e.g. Dim, Sub), as are confusing numerical types, apparently unnecessary keywords (Set, Call), bracketing on calls, default members, etc, etc. If you designed it from scratch now, it wouldn’t look like VBA!

    ‘Incubation’: for in-house learning, yes; on a 2-day training course you don’t that opportunity.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

November 2009
« Oct   Dec »

%d bloggers like this: