in General

Securing VBA Code in Excel – don’t hold your breath

Over at Data Pig Mike shows us how to crack the VBA Password. I think it’s always been a bit of an unwritten rule that those of us in the club, never passed on how to do the crack, for example if someone asked on a news group or forum. So Mike has broken the code a bit. But to be honest, that’s of little practical importance. This is not the first time this information has been disclosed on the internet, [1234], and there where post about this method for years and years, in one place or another. I’ve even seen code on Linked in showing how to automate the removal of passwords – hell, I’ve even copied that code and put it in an addin I use!!!

How lazy can you be?

How lazy can you be?

Securing VBA code has been a bit of a Golden Goose for me over the years. I would love to just compile some VBA code and ship that as a .dll addin. Indeed, this is possible – assuming you have a copy of MS Office Developer (last version XP I think), so that is one option, – old copies can be had for as little as 60 quid (Microsoft Office XP Developer) . But to be honest if you’re going to do that, you might as well go the whole hog and do a VB6 COM addin, right? – I’m not sure about UDF’s via Office Dev versions…?, they don’t work via COM addins.

Any way, I have looked into this whole issue in some depth, and I cannot think of a way to really lock down your VBA code. I have suggested this MDE method before which works in a pinch.

In a product I have in development, I’ve designed and coded a secure system which uses VB6 to hold a licence code, tying the app to the PC – days left can be used – but even this is an issue without a internet connection – everything is a compromise. In this approach the UI stays in VBA, but the important methods are hidden in complied dll’s, which the VBA app calls to. These VB6 dll’s (could be C, or other lang) then do a licence check and if ok carries on. works fine, even on Win 8.1, but requires installation etc.

Basically there’s no way to secure VBA in Excel as we know it. You can make it harder,   there’s the old shared workbook trick, but that’s easy to overcome if you know how. VBA ossification can be OK if done well, but you can’t obscure an Office Apps OM, so it of limited use.

The best answer if you want a secure an addin is to used something that makes a complied dll,  .Net*, C, or I guess VB6/Dev editions of Office, and if you want a quick fixed consider the mde method above.

I’m always interested in other approaches people have, leave a comment.

*well, ossification – its different to VBA ossification

Google Calendar Sync

Recently Google pulled the plug on their Outlook to Google calendar sync tool. I have had ongoing nightmares with any and all of the other (often expensive) sync tools commonly available. All I ever want to do is push my work calendar events on to my phone. I don’t even care about doing it the other way around – I always have my phone, I often don’t have my work laptop.

Anyway, long story short, there is a blinding little app over on codeplex, works like a charm, even behind the corporate firewall, which is the cause of most issues for me. Amazingly its only been downloaded about 10,000 time, which must mean people don’t know about it. So lets get the word out there!!

Why google or MS could not write this themselves is utterly beyond me. More generally, I’m really starting to dislike/distrust Google.

This post will change the way you think about VB6, for ever…

Oh, no sorry it wont, but I’ve just been on Facebook!!!

This is just a link to an post over at Code Project about VB6. It highlights some cool applications written in VB6,

That all!

BTW the maths library mentioned in the post seems to be the ALGIB library, so I’m not sure that that really counts as open source, but whatever!

Best HTC One Case? Try these relatively cheap options.

My HTC has turned out to be an OK phone, I wouldn’t say I love it, but its OK, a steady performer. It’s much herald good looks are, in my opinion, vastly over stated, and the 4 ultra pixel camera is about on a par with the iPhone – no better, no worst.  Over all it’s an OK phone.

I’ve had an original HTC case for the thing from day one, I feel much the same about the case, it’s fine, but not amazing. Give the cost, actually maybe I’m a little bit disappointed – it wasn’t cheap.

Away today I drop the phone for the second like in its life, and it looks like the case has given up the ghost.

Cracking stuff - better the case than the phone!

Cracking stuff – better the case than the phone!

So off it was to find a replacementRecently I have been looking for cases for iPads, iPhone, and my nexus 7, its surprisingly hard to find any decent input on what cases are good. And trawling amazon is a pain in the backside. So here are two cases I like for the HTC One, they don’t cost the earth, and offer a decent balance between protection and bulk – although one is fairly massive I guess. Anyway I like them, and they work fine. Enjoy.

This has a kick out stand, good for the kid watching pepper pig, comes with a screen protector, and is forfill by Amazon, so postage if free. it five quid, what more do you want??

This guy is a little thinner, made of TPU, comes from the USA, cost 4 quid, and has free postage. Bargin!