'propriétés utilisées pour gérer l'option 'Accès approuvé au modèle d'objet du projet VBA' d'Excel
Public Property Let VbomAccess(p_b_value As Boolean)
Static s_o_wshShell As Object 'IWshRuntimeLibrary.WshShell de la référence 'Windows Script Host Object Model'
Static s_s_keyName As String
If s_o_wshShell Is Nothing Then Set s_o_wshShell = CreateObject("WScript.Shell")
If s_s_keyName Like vbNullString Then s_s_keyName = "HKEY_CURRENT_USER\Software\Microsoft\Office\" & Application.Version & "\Excel\Security\AccessVBOM"
s_o_wshShell.RegWrite s_s_keyName, -CLng(p_b_value), "REG_DWORD"
End Property
Public Property Get VbomAccess() As Boolean
Static s_o_wshShell As Object 'IWshRuntimeLibrary.WshShell de la référence 'Windows Script Host Object Model'
Static s_s_keyName As String
If s_o_wshShell Is Nothing Then Set s_o_wshShell = CreateObject("WScript.Shell")
If s_s_keyName Like vbNullString Then s_s_keyName = "HKEY_CURRENT_USER\Software\Microsoft\Office\" & Application.Version & "\Excel\Security\AccessVBOM"
VbomAccess = s_o_wshShell.RegRead(s_s_keyName)
End Property