Link to home
Start Free TrialLog in
Avatar of Ajay Anand
Ajay AnandFlag for India

asked on

ways to make VBA code secure

I a am Civil Engineer and I am using VBA for Excel from last 10 years. Recently I developed a macro to generate payslips of employees and my friend's company purchased it.

I think more companies require that tool which can make their life easier and I am also interested in the monetary benefit.

But a person with a little knowledge in VBA can break the password, will be able to steal the code and I don't want that to happen. I am looking for ways to make the code secured.

In this regard I expect expert's help.

Thanks in advance
Ajay
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

This tool woks

Unviewable

It locks the VB Project securely.
Dave's first link is the best clue to what you need to do.  Trying to "secure" an Excel VBA code module from someone who knows his way around an IDE (Integrated Development Environment) is a lesson in futility.  This very reason is why add-ins exists.  They allow pro developers to develop secure, compiled add-in code functionality for Office applications.

The only possible exception is Microsoft Access, which, in the hands of an experienced VB 6 developer, is a lot like "Visual Studio Light" for Office.  You can compile VBA in an Access app and integrate a lot of other applications with it, but who wants to use Access for professional Office application development ?  (hint - a lot of pro developers do for that very reason!)

It's the OTHER apps in Office (Excel, Outlook, PowerPoint, Word, etc.) that DON'T have the capability to create compiled applications, or have a royalty-free "runtime" version of their .exe.  Also, Access gives you the capability to create apps that look as though they were created with .Net or Visual Studio 6.  All you have to do is see the difference between an Excel form and an Access form to see why (goggle it if you dare...).
If you cannot access the code then you cannot change it or copy it. Unviewable does that, I know of one way to overcome it but I would not share it.

You can also obfuscate the code, i.e make it harder to read , see this
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.