# VBASafe....protection for VBA Code



## kblaine123 (Oct 12, 2009)

I found this software that will scamble your VBA code used for .XLS files and it seems to be exacted what I need......HOWEVER,

I can find no reviews

If the VBASafe scrambles the code, then can't it be unscambled ?

Which begs the question....yes, its safer than MS Excel protection, but is it REALLY safe from hacer software ?

Any of you gurus have any comments on this software and its possible limitations...or is this the Holy Grail to protect my 'intellectual property' ?

Thanks, I really need your input.


----------



## kblaine123 (Oct 12, 2009)

I'm surprised nobody has any comments on this subject.....I can't be the only sole out there wanting to share spreadsheets yet protecting intelectual property !! I'm not even a guru like most of you.....lol.

Calling all Gurus.............


----------



## SydneyGeek (Oct 13, 2009)

I took a look and it's an interesting idea. No hands-on experience, so I can't comment further. My general attitude to security with Excel is that it's a non-event. It generally will keep out honest people but hackers can gain access quite easily. 

I guess scrambling the code will make it harder for hackers to work out what's happening, but I suspect that anyone who *really* needed to get to the source code could decipher it. Are you distributing a workbook, an add-in, a utility... ?

Denis


----------



## kblaine123 (Oct 13, 2009)

Thanks for your comments Denis.

Its a workbook, with a hundred or so sheets.
I have a macro driven spreadsheet that downloads thousands of rows of data from a web-based database and then it sifts thru the data to give me actionable (its commodities related data)  trading / hedging ideas.

I concur that the Excel protection alone is insufficient, consequently I thought the scrambling would add a much greater layer of protection.


----------



## SydneyGeek (Oct 13, 2009)

It's worth a go, but I would do it on a copy of the project so that (1) you can continue to make changes and (2) you have a fallback position if it goes pear-shaped. 

If you can get your hands on a copy of VB6 you might consider turning the code into a VB6 application. The compiled .exe will be much harder to reverse-engineer than any VBA code.

Denis


----------



## mathias.brandewinder (Oct 14, 2009)

I would concur with Denis. Obfuscation won't really protect you, it will just slow down someone from being able to read your code. If you look at the example provided, you can reconstruct what the code does fairly easily; it's essentially changing the variable names in your code into "bad" variable names. With enough patience and string-replace, you could rebuild the code.

Another IP protection issue with Excel is that it's difficult (impossible?) to prevent people from re-distributing your code. Once your spreadsheet is out, it's out for anyone to copy.

I second Denis with the advice of going VB6, or, my preference, .NET. You could extract the sensitive logic part of your code into a piece of code which should be easier to protect (with obfuscation, dongles...). One intermediate possibility would be to extract the logic into a VSTO add-in in written in .NET. The downside is, the learning curve is steep - but if you are concerned about security, Excel will have strong limitations. The plus side is that, besides security, the arsenal of what you can do from .NET is much broader.

Hope this helps!

Mathias


----------



## kblaine123 (Oct 14, 2009)

Hey guys....I appreciate your responses.

Before I attempt the avenues that you have suggested, please let me ask one more question.

This is just an idea, maybe its doable....maybe not.

Lets say I layer my protection.
1. use the built-in Excel VBA project protect
2. scramble it with VBASafe
3. Within the VBA code, write in some kind of private-sub (can you do VERY private subs like the veryhidden?) that basically destroys the code if someone opens it or changes one little thing. I mean I intend to have a private sub that expires the macros in 30 days anyhow, but maybe some kind of sub that made it self-implode if tampered with in any way shape or form would be even another layer ?

is #3 Possible or not ?

Thanks again.


----------



## mathias.brandewinder (Oct 15, 2009)

To the best of my knowledge, #3 is not possible.


----------



## spine (Nov 8, 2013)

did you try VBASafe? howdoes it works?




kblaine123 said:


> Hey guys....I appreciate your responses.
> 
> Before I attempt the avenues that you have suggested, please let me ask one more question.
> 
> ...


----------

