Disable Macro in Single Project File

Matt Grenier 1 Reputation point
2022-12-06T14:40:06.5+00:00

I have a Project file that runs a macro when it is opened to populate it with data. Once it has done so, I would like to save a copy of the file for distribution to colleagues. I do not want the macro to keep running when they open the copy. If I can disable macros on the single file before distributing that would solve my issue, delete the macro in a single file would also work but it seems if I delete the macro, it gets deleted from everywhere not the single file. I am open to any other solution that would allow this copy of the file to be opened and ensure the macro would not run as well.

Thanks.

Office Visual Basic for Applications
Office Visual Basic for Applications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Visual Basic for Applications: An implementation of Visual Basic that is built into Microsoft products.
1,506 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Oskar Shon 866 Reputation points
    2022-12-07T17:00:14.113+00:00

    That easy. In your autorun makro type condition if application.username = "Your user name"
    and that 'll works only on your site.

    Another way is to prepare procedure with inside parameter.
    If you paste it, 'll works.

    Regards


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.