Quote Originally Posted by John Jok View Post
Thanks again and correct me if I am wrong but I don't quite see how my colleagues will be able to run the code if I'll have to run it from VBE.
Do you want them to be able to run the code, or don't you? If you do, put in in a workgroup template and apply password protection to the VBA project. Simple, safe, and effective.


You originally said:
Quote Originally Posted by John Jok View Post
Problem is that not only I want to keep the source code completely safe from my colleagues and the management, but for now I would like to let everyone but me only use it without actually owning it or running it independently.


Therefore, the file under development should not contain any of the code I have built, but make it somehow load it upon use and unload it afterwards.
The source code should be totally absent from the file under development and saved in another, hidden location in our common file server, where all colleagues have access.
That is precidely what a workgroup template with a protected VBA project achieves.
Quote Originally Posted by John Jok View Post
Now, the VBA project security I was referring to has to do with the passwords.
I've done some research and they say it's quite easy to crack a password-protected document (including the access to VBE) with a brute force method.
Password protection in the pre-Office 2007 environment was weak, being more suitable to keeping incompetent coders out of the VBA project than for security against determined hackers. The Office 2007 and later environment has much stronger security.


There's also a lot you can do to obfuscate your code, too, if that's what you want, such as:
• using the enumerated values of named constants instead of those constants' names;
• giving your variables meaningless or misleading names; and
• adding clutter by inserting modules, subs, functions, & code blocks that never get called.


Any password-based security is susceptible to brute-force attacks but that takes significant effort. Do you really think your (unappreciative) management & colleagues are going to invest that amount of effort just so they can mess with your code?

You being paranoid isn't proof your (unappreciative) management & colleagues are out to do harm and, more importantly, you have no right to keep code you're using at/for work from your organization's management. They have a right to review the code you're using to ensure it won't cause harm and/or give bogus results.