Disable All VBA/Macros for a Workbook/Addin

animas

Active Member
Joined
Sep 28, 2009
Messages
396
This workbook could be a single workbook with VBA or an Addin file.

In corporate environment we/developer create some custom workbooks for automation. In future, we may leave the organization, excel code architecture may change and our created code can create errors or wrong tasks for those workbooks. Since VBE codes are usually password protected, user(less/no vba knowledge) need a easy way to disable our macros/ codes in workbook/addin completely and keep working with the workbook as if no macros were there.

Disable macro at starting of the file is an easy solution. But sometimes inexperienced users enables macros by mistake and problem may occur.

I was thinking of creating a named range in a sheet. In each called macros, I check if named range value(yes, no) and then go on with the code, else do nothing. User changes the value to "No" and all macros/vba/function stops working.

Before implementing this, I need your suggestion and how do you deal with similar situation?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top