Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Protecting VBA code in excel

Options
  • 29-08-2007 11:08am
    #1
    Closed Accounts Posts: 114 ✭✭


    does anybody know how to prevent people from accessing and/or modifying VBA code behind a macro?

    I've written an Excel model for work and now i have to roll it out to the business but I don't want people messing with it and certainly don't want people being able to copy the code.

    Thanks in advance guys


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    One thing springs to mind that might be possible - Could you compile the Macro code into an ActiveX dll and reference that from Excel? This would achieve both goals for you.


  • Registered Users Posts: 683 ✭✭✭Gosh


    In the Project Explorer view right click on the VBAProject item and click on VBAProject Properties, click on the Protection tab, check the 'Lock Project for Viewing' and enter a password below. Make sure you save after doing this and the code will not be visible to anyone without knowing the password.


  • Closed Accounts Posts: 114 ✭✭UsedtobePC


    That's just exactly what I needed. Thanks a mil!


  • Closed Accounts Posts: 86 ✭✭rasoul


    It is though, very simple to run a macro that hacks the VBA password.


Advertisement