Prompt User to Enable ActiveX Controls in Excel 2010

neodjandre

Well-known Member
Joined
Nov 29, 2006
Messages
950
Office Version
  1. 2019
Platform
  1. Windows
This is quite annoying and i am sure it's going to help others as well - it took me 1 hour to figure this out and thank god I found this quite early because I was getting very annoyed..

The problem: A perfectly working complicated macro was running fine in all Excel versions.

However, in Excel 2010 I came up with the error "571221" Application-defined or Object-defined Error when trying to make a sheet visible.

The culprit... ActiveX controls in the Trust Center were disabled...

no idea why.. when i set the ActiveX settings to "Prompt me before enabling all controls with minimal restrictions" the macro works perfectly fine again..

So my question to you guys is:

1. why does this happen?

2. how can i write macro code to check the ActiveX setting and if it's set to "Disable all controls" prompt the user to change this?

many thanks
Andy
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,224,520
Messages
6,179,270
Members
452,902
Latest member
Knuddeluff

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