A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
In VBA there is always a possibility to get the code.
There are many offers on the web to protect a VBA project, some are just stupid, some sophisticated, but so far I have been able to open any VBA project and look at the code.
And if you dive really deep into an office file, then you can also extract the binary VBA data and write yourself a decompiler.
The description of how Office saves or reads a VBA Project is officially available.
MS-OVBA Office VBA File Format Structure Specification
https://msdn.microsoft.com/en-us/library/office...
So what are the options?
You can make it illegible to humans by replacing each expression with a different string, e.g.
Sub IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIl()
Dim IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIlI, IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIll, IIIIIIIIIIIIIIIIIIIIIIIIIIIIIlII
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIlII = Array(67, 111, 100, 101, 115, 99, 114, 97, 109, 98, 108, 101, 114, 32, 98, 121, 32, 65, 110, 100, 114, 101, 97, 115, 32, 75, 105, 108, 108, 101, 114)
For IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIlI = 0 To UBound(IIIIIIIIIIIIIIIIIIIIIIIIIIIIIlII)
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIll = IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIll & Chr(IIIIIIIIIIIIIIIIIIIIIIIIIIIIIlII(IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIlI))
Next
MsgBox IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIll
End Sub
Looks like nonsense but works, try it.
A better protection offers an external DLL, which does not contain plain text and extracting parts from it is not easy, but still possible.
The idea of protecting a code is really old, when I started programming over 30 years ago it was about modifying a compiled EXE file so that you could no longer examine it with an assembler debugger.
That was a sport at the time and as a byproduct some treacherous viruses comes up that made the antivirus industry desperate ... there are viruses that can rewrite there own code.
But what is it good for? After my years of experience for nothing.
If you show people a project and how they can work with it, then any professional programmer can at least mimic this. There is no need to see the code.
This is normal for freelancers like me, every customer comes with an idea he has seen somewhere and now wants a program that works for his purposes.
The only question that matters is: Do I have the background information to do it?
I never protect my codes.
I prefer to use my strength to convince my customer through good work so that he will call me again next time.
Andreas.