Fix ActiveX Warning




Sub CheckFixkeys()
'fixes warning message below by changing Registry MS KB 827742
'This application is about to initialize ActiveX Controls that might be unsafe. If you trust the source of this document, select Yes and the control will be initialized using your document settings.
Dim strKeyPath As String
strKeyPath = "HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\LoadControlsinForms"
If RegKeyExists(strKeyPath) = False Then
strKeyPath = "HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\LoadControlsinForms"
oShell.RegWrite strKeyPath, "1", "REG_DWORD"
End If
End Sub