The message shown below is very annoying. I figured out how to disable it completely, (for EVERY ActiveX control), but that does not seem to be very safe.
Is there anyway to disable it for only a single control and only when that control is being load in my userform?
I have tried signing the code with a SelfCert certificate, but that did not help.
the control is only being used at 3 computers and will never be distributed so registry hacks would be acceptable.
The full text of the message is as follows
This application is about to initialize ActiveX controls that might be unsafe. If you trust the source of this file,
select OK and the controls will be initialized using your current workspace settings.
-----------To demonstrate problem, do the following --------------------
open new workbook
save workbook as "annoying.xls"
alt f11 to vba ide
Insert userform into annoying.xls > click on userform1 gray shaded window
tools > additional controls (dropdown) > put an X next to Adobe PDF reader (or another ActiveX control, but most of the dropdown additional controls do not exhibit this problem)
drag the AcroPDF control read onto the userform1
save the workbook
Close excel then reopen the workbook
You will see the message when you use alt f11 to look at the userform.
-------to disable the message ----------------
per kb827742
open registry
under HKEY_CURRENT_USER\SOFTWARE
\Microsoft
\VBA add a key named Security
under HKEY_CURRENT_USER\SOFTWARE
\Microsoft
\Security add a dword named LoadControlsInForms
set HKEY_CURRENT_USER\SOFTWARE
\Microsoft
\Security\
LoadContro
lsInForms to the value 4 (although 1 also works)
I really have know idea what else this hack does, but it clearly disables the warning message entirely which is clearly not safe.
Start Free Trial