Detecting sandbox mode in VBA?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a reliable way to detect that a user has macrosecurity set to low
(and Jet4 sp8 installed) from within vba ?
 
Thanks for your reply Alex,
So the key to read is:
\\HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\engines\SandboxMode
that would be nice, but how to read this key from within vba?

Can you tell me how to do that?
 
Hi Alex, thanks for this link, it helped me a lot.

So this is what i do is:
Read the registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\engines\SandboxMode
If it is 1 or 3 then sandbox mode is activated and unsafe expressions should
be blocked.
If it is 0 or 2 then expressions are evaluated in Access.
So far OK, this works for my computer and some other tests were OK also, so
i rolled out my app and next thing happening is a user contacted me telling
me the registry key on his computer is 1 or 3 but the 'unsafe' expressions
are still being executed. On his computer in Access Tools>Macro>Security is
set to Low, but the registry key did not follow this setting and still is 1
or 3.

So reading this reg key is not reliable enough to know whether Macro
security is set to LOW or not?
Can you, or anyone else explain to why this might happen and how to do it
correctly ?

Help would appreciated...
 
Back
Top