none
User can Run macros but restrict them from developing it RRS feed

  • Question

  • HI All,

    Can we allow Users to Run Macros that is there in the organization but restrict them from developing it. This is to have a control on the Macros & its misuse by end users.

    Thanks & Regards,

    Unnikrishnan

    Saturday, March 10, 2018 11:27 AM

All replies

  • Hi All,

    Is there a mechanism in place where by, i can allow users to View/Run but restrict them from developing it.

    Regards,

    Unnikrishnan

    Saturday, March 10, 2018 11:47 AM
  • You can protect the Visual Basic code with a password:

    • In the Visual Basic Editor, select Tools > projectnameProperties...
    • Activate the Protection tab.
    • Tick the check box 'Lock project for viewing'.
    • Enter the password that you want to use in both boxes.
    • Click OK.
    • Switch to Excel and save the workbook. Next time it is opened, the Visual Basic code can only be viewed and edited after supplying the password.

    Warning: this will keep out ordinary users; there are ways to get through it if you really want to.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Saturday, March 10, 2018 1:22 PM
  • Convert your .accdb file to a .accde file using Database Tools--> Make ACCDE. Make sure your .accdb file is compiled first and make a backup copy of the .accdb file. Distribute the .accde file to users.

    Saturday, March 10, 2018 2:11 PM
  • And although it's not required, I would go as far as renaming the ACCDE file extension into ACCDR to perhaps further limit what users can do when they run it.

    Just my 2 cents...

    Saturday, March 10, 2018 4:45 PM
  • To add to what others have suggested and which I fully agree and support, read over http://www.devhut.net/2016/09/01/securing-your-ms-access-database-front-end/ it may offer a few other ideas for securing your application.

    Daniel Pineault, 2010-2017 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Saturday, March 10, 2018 6:48 PM
  • Thanks for your revert but how can one restrict in MSexcel. If I check GPO it only says , either we can disable the Macros or can enable for everyone.

    As per my requirement, I want Users can run it but can't create any Macros unless we allow them to create it after taking necessary approvals.

    Can this be achieved through GPO or some central mechanism?

    Thanks,

    Unni

    Tuesday, March 13, 2018 4:22 AM
  • Hello Unni_Krn,

    Please check Hans solution to protect your VBA project with password.

    It will prevent use to view and modify your code. However, you could still assign macro to a button control and click the button to run the macro.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 13, 2018 5:51 AM
  • OK Thanks appreciate your quick response, in this scenario it will prevent from modifying the already created Macros but my requirement is to block the users from creating any new Macros & to run the already crated Macros.

    Regards,

    Unnikrishnan

    Wednesday, March 14, 2018 5:07 AM
  • Hello Unni_km,

    >>block the users from creating any new Macros & to run the already crated Macros.

    As far as I know, it is impossible. Microsoft does not provide any function to make the VBA code "ready-only".

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 14, 2018 5:50 AM
  • Hi,

    There is no way to achieve what you want to do, except the way Hans suggested. 

    Regards,

    Ashidacchi >> http://hokusosha.com/

    Wednesday, March 14, 2018 6:43 AM