top of page

You are learning Macros in MS Excel

How to share macros with other users securely?

Here are three common methods to share macros with other users securely in Excel:

1. Using a Shared Workbook (Moderate Security):

* Process:
1. Create a new workbook (.xlsm file format is recommended as it allows macros).
2. Develop your macros within the Visual Basic Editor (VBE) accessible from the Developer tab.
3. Save the workbook on a shared network drive or cloud storage platform accessible by authorized users.
4. (Optional) Enable "Share Workbook" functionality to allow multiple users to access and potentially edit the workbook simultaneously (be cautious with this option as it can lead to conflicts).
* Security:
- Moderate security. Anyone with access to the shared location can potentially view or modify the macros within the VBE, depending on permission settings.

2. Using an Add-In (High Security):

* Process:
1. Develop your macros within the VBE.
2. Save the project as an Add-In (.xlam file format). This encapsulates the macros into a separate file.
3. Deploy the Add-In to a trusted location on each user's computer. This might involve manually copying the file or using a deployment tool.
4. Users can then access the macros through the "Add-Ins" menu in Excel.
* Security:
- High security. Users can only use the functionality exposed by the Add-In, not the underlying macro code. This protects the actual code from unauthorized viewing or modification.

3. Signing Macros with a Digital Certificate (Very High Security):

* Process:
1. Develop your macros within the VBE.
2. Purchase or obtain a digital certificate from a trusted Certificate Authority (CA).
3. Use the certificate to digitally sign your macros within the VBE.
4. Distribute the signed macros along with instructions on how to import and trust the certificate on each user's computer.
* Security:
- Very high security. Excel will warn users if they attempt to use macros that are not signed by a trusted certificate. This helps prevent unauthorized or malicious macros from running.

Additional Considerations:

* Document the macros: Always provide clear documentation explaining what the macros do and how to use them.
* Test thoroughly: Ensure your macros are well-tested to avoid unintended consequences.
* User awareness: Educate users about the potential risks associated with running macros and advise them to only use macros from trusted sources.

The best method for sharing macros depends on your specific needs and security requirements. If security is paramount, using an Add-In or signed macros is recommended.

bottom of page