Does anyone know of a way of enabling macro support automatically as a sheet opens so the user can't disable the macro via the virus warning dialog at startup ? ? ?
With Word, the macro virus protection can be disabled with the
following command:
Options.VirusProtection = False
To my knowledge, there is no such command for Excel. However, this
option can be changed with a reg hack that could be initiated from a
batch file or from a VBA macro Shell command. On my PC, the "Macro
Virus Protection" option is stored as a dword value in the following
registry key:
To enable the virus protection, use:
"Options6"=dword:00000008
To disable the virus protection, use:
"Options6"=dword:00000000
This may not be exactly the same for every PC as "Options6" controls
several options depending on the value of the first four bits. See
below for details:
bit 0 Show Name part of Chart Tips
bit 1 Show Value part of Chart Tips
bit 2 Intellimouse Roll action: 0 = scroll, 1= zoom
bit 3 Macro Virus Protection
bit 4-15 (Reserved)
For more details, refer to the following TechNet article:
Q169811 - XL97: Using the Policy Editor to Force Macro Virus
Protection "
We have Office XP on Win2000 (actually Citrix Metaframe) and are suffering the same problem in Excel.
We have used selfcert.exe to create a code-signing digital signature and have signed the Excel macros accordingly. However when a different user updates the workbook and saves it (even if though they haven't amended the macros) it removes the signature, telling them that they have amended the project. It then naturally disables the macros when they next open that workbook, so that I end up re-signing the workbooks on an almost daily basis.
The company that supports our installation has been looking into this problem for months without success and I am desperate for a solution. I cannot believe that everyone else is living with this problem, so how are others getting around this issue?
use a vbscript file (or an exe) to change the setting of security in the registry (post in a mail attachement, or insert into your document a link to the script file). If direct running from a mail attachement is disabled, zip this file and send that zip to users. you can run this via a logon script also if you are a net admin.
something like this:
Enable Macros (in a separated file):
Sub main()
Dim wscr
Set wscr = CreateObject("WScript.Shell"
wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\Security\Level", 1, "REG_DWORD"
wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security\Level", 1, "REG_DWORD"
End Sub
or DisableMacros:
Sub main()
Dim wscr
Set wscr = CreateObject("WScript.Shell"
wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\Security\Level", 3, "REG_DWORD"
wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security\Level", 3, "REG_DWORD"
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.