Teaching Myself VBScript… Yuck

I have been brainwashed to believe that everything done by Microsoft is crap.  Their anti-competitive business practices and non-standard complying products have continuously made my life difficult.  As a result I try as much as possible to avoid working with or on Microsoft products.  Unfortunately it’s not always possible.

I’m finding myself having to support a large number of excel spreadsheets and vbscripts as my responsibilities have changed at work.  And so I have started to put some effort into actually learning the tools, learning the languages and trying to get my head around the Microsoft way of doing things.

First Impressions:  What a Mess!

Maybe I just don’t know what to look at but every bit of documentation seems completely different.  The VBScript syntax is incredibly inconsistent.  And there’s no interactive debugger for it?  What’s up with that?

For example. 

  • Sometimes you need to declare a variable with Dim before you can use it and sometime you don’t.  And if you want you can force it that you need to in all cases… but it’s an option.
  • Sometimes you need to use Set to do assignment and sometimes you don’t
  • Some types of objects are created with a new statement and others use a CreateObject function.

All these idiosyncrasies and special cases add up to make a language which is more complicated than it needs to be.

I’ll keep struggling through and maybe eventually I’ll get the hang of it.