How to enable macros automatic?

J

Jim Thomlinson

You can't. Enabling macros is a security feature to prevent viruses. It would
not be too useful if a virus could just enable macros.

What you can do it look at digital signatures or setting up a system to make
the spreadsheet indicate that Macros are not enabled. Basically have a sheet
that gets hidden by a macro. If macros are not disabled then the sheet does
not get hidden and the end user is notified of the need to enable macros...
 
G

Gord Dibben

Macros must be enabled before the open event can take place.

Otherwise there would be no need for macro security settings.

Maybe re-think your project needs?


Gord Dibben MS Excel MVP
 
M

Mark Ivey

One idea...

You could run a VBScript before opening the Excel file to set the macro
security to medium or even low. Here is a script that will change the macro
security level to low for Excel XP. The path may change a bit for different
versions of Excel.


Option Explicit
Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
RegLocate =
"HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Security\Level"
objShell.RegWrite RegLocate,"1","REG_DWORD"
WScript.Quit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top