0

We can set password to our project:

In VBA Editor: Tools > Properties > Protection (Set pass and check "lock for viewing protection").

But there is easy way to get access to code. I don't want to describe, but its easy (with hexeditor).

Is the way to really secure my code in .dotm file (without loosing .dotm functionality as Word template)?

deku
  • 85
  • 10
  • 5
    You cannot "really" protect your VBA code. Try creating a COM add-in, which is compiled... – FaneDuru Feb 01 '21 at 13:54
  • 1
    Does this answer your question? [Best way to protect Excel VBA code?](https://stackoverflow.com/questions/16757119/best-way-to-protect-excel-vba-code) – TylerH Feb 01 '21 at 19:10
  • 1
    Also https://stackoverflow.com/questions/16363621/protecting-code-in-an-excel-workbook – TylerH Feb 01 '21 at 19:11

1 Answers1

2

There is not really a way to make VBA code secure beyond using password protection. There is an article I found in doing a Web Search on Obstrafication for VBA, but if it was me, I wouldn't do it.

I recommend that you investigate building your solution .Net and VSTO. With compiled code, you can then Obstrficate it with products like .Net Reactor.

Rich Michaels
  • 1,663
  • 2
  • 12
  • 18
  • 1
    Thanks. I'm looking for build-in or external solution for better security of my knowledge and used tricks. I know that all my code will be more secure when I will convert it to compiled language, but its not easy with 500k lines of code, lots of template and lots of dependencies, and over 2M files maintained last 20 years in current system based on existing and evoluating solution. Easy to quick debug at almost every machine (with problem) and very good efficency is an extra feature too. – deku Feb 02 '21 at 05:36