Template becomes a Trusted document ?

stuartgb100

Active Member
Joined
May 10, 2015
Messages
287
Office Version
  1. 2021
Platform
  1. Windows
I have a project saved as a true template.

When I open the template (a copy of the template) for the 1st time, if macros are NOT enabled only one sheet named EnableMacros is visible. This is a prompt for the user to enable macros.

This behaviour is by design.

When macros are enabled, the Open_Event fires and the EnableMacros sheet is hidden, and 3 other sheets are made visible.

This behaviour is also by design.

If I open a copy of the template (when macros are disabled) and then close the workbook having done nothing, then when I open another copy the EnableMacros sheet is visible.

This behaviour is also by design.

However:

If I open a copy of the template and choose to enable macros, then close the workbook without saving,
then when I go back to the template and open a copy, the Enablemacros sheet is hidden, and the 3 other sheets are visible.

How has this been made possible ?

I understood that opening a copy of a template ensured that the template could not be modified.

Wild guess - by opening the template and enabling macros, has somehow the template become some sort of a "trusted document" ?

Thanks.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
When you "Enable Macros" on a specific workbook, the trust center remembers. Excel won't ask to enable macros on that document unless the filename changes & is re-opened under the new filename.
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

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