Consulting

Results 1 to 11 of 11

Thread: Activating a macro from another file for advanced security protection

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,273
    Location
    Quote Originally Posted by John Jok View Post
    by following the template method, I cannot achieve the level of security I am trying to.


    Anyone can follow the path to the source code (the .dotm file) by opening the "Document Template" menu from Developer tab or throught File -> Options -> Add-ins -> Templates -> Go.
    Furthermore, the source code is accessible to anyone from the Visual Basic Editor if they open it.


    It's well known that the password protection system of office documents is not quite robust, therefore I came up with the suggested solution as described in post #1.
    If you think about it, it's unbreakable (thanks to converting the Excel code to binary form).
    As I said, the macro code in the template is only available to the document if the template is available. That should not be an issue if you save the template in your local templates folder since, even within workgroups, other users don't ordinarily have such access.

    But if you don't want to do that, simply save the blank as an ordinary document in your own folder and make sure both documents are open if you want to run the macro and that the document you want to work on is the active one. The only inconvenience is that you'll need to run the code from the VBE instead of from within the active document.

    As for VBA project security, contrary to what you say it is fairly robust. Your deprecation of it, combined with your secretiveness about your code, suggests there is another motive. As an employee or contractor, any code you might develop is the intellectual property of the organization you're working for unless there is an employment/contract clause explicitly saying otherwise.
    Last edited by macropod; 10-10-2024 at 02:29 PM.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •