Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Security Warning Enable Content

Tags:

excel

vba

The first time I open a new version of my excel aplication, I get a securutiy warning. I click Enable Content but the Workbook Events that need to initialise the application don't fire.

After I close the workbook and open it again it will be fine - the Security Warning does not appear and all of the events fire as designed.

I'm not sure if this behaviour will be the same for all users and I would prefer not to ask them to just close it and re-open if it happens. I think I can ask the users to create a trusted folder and I will investigate that option as a solution, but is there any way to avoid the problem all together?

I can't use a subsequent event that in any way references the sheet I want to configure (for example right-click or sheet activate, even in the ThisWorkbook Module). This is because I have OLEobjects on the sheet, which are stored in a Global Collection and the Collection will be un-loaded if I, in any way, reference the source sheet.

Is there any other way to work arround this?

like image 787
Cool Blue Avatar asked Sep 20 '26 15:09

Cool Blue


1 Answers

I'm not sure if this behaviour will be the same for all users

It is. There is no fix for it yet and I doubt there will be. You will have to close and re-open the file.

Is there any way to avoid the problem all together

No... Not that I am aware of. The only way is what you already know. Ask the users to create a trusted folder. More on Trusted Documents

like image 177
Siddharth Rout Avatar answered Sep 22 '26 10:09

Siddharth Rout



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!