December 2008

The cost of Office

When Simon recently stole my post idea [:-)] with his “Best/Favourite Excel version” it got me thinking what spread sheet offered the best value. I quickly came to the conclusion answering that particular question would be, well a bit rubbish really, and that nobody else would care anyway. But I still wanted to make a post that somehow allowed me to highlight Murphy’s theft(iry).
With this goal firmly establish I got to thinking about the cost of developing Office solutions, which in turn lead me to the cost of owing Office period. After a bit of research (which was much harder than I thought it was going to be), I present the following (and look forward to Simon reposting this in a few months :)))))))))))))))!

OfficeCost.PNG

So as you can see, the cost of Office is coming down!!! Good news. Office XP (office 2002) seems to be a bit out of line. The only costs I could find for XP where in GBP, so even when I converted to $ and took of 20% they still look a bit keen.
However thats not the whole story is it! Because as you will no doubt be saying to yourselves (well done you clever thing you), a 100 quid in 97 is not the same as 100 quid today, here’s the normalised data, and the news looks even better!

OfficeCostNormal.PNG

So in conclusion Office is now cheaper to own than ever before and the cost difference between Standard and Professional is smaller than ever before. Oh and Simon Murphy is a massive content theft*”¦

*not really, he’s ok actually.

Setting the default value of a Class in VBA.

There is no keyword in VB6 that allows you to set the default value of a class. Code like this for example will error out.

Public Sub Test()

Dim x As New MyClass

x.Name = "Ross"
x.Name2 = "Dave"

MsgBox x

End Sub

However it can be done, even if it's a bit of a pain! Export the class and add the following code in note pad, as the first line under the function heading:

Attribute Name.VB_UserMemId = 0

The value must be 0, and the Attribute must be the name of the function, get, etc. you want to use as the default. The notepad file might look some thing like this!

MyClassPic.PNG

Save the changes in notepad, in the IDE delete and re-import the class. The code will now work! Amazing! If you make any major changes to the class code you will have to redo the process, that's the PITA bit!

Example Workbook: DefaultTest.xls