View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mark Ivey Mark Ivey is offline
external usenet poster
 
Posts: 120
Default security Level settings in Excel

If you were interested... here is a version independent VB Script that you
can run to alter these settings:

Option Explicit
Dim objShell, RegLocate, myVersion, objExcel
Set objExcel = CreateObject("Excel.Application")
myVersion = objExcel.Version
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Office\" & myVersion &
"\Excel\Security\Level"
objShell.RegWrite RegLocate,"1","REG_DWORD" ' 1 for LOW, 2 for MEDIUM, 3
for HIGH
objExcel.Quit
WScript.Quit

Also, Jon Peltier had posted some other information on this topic as well.
Here is the information he posted on this topic (see the correspondences
below):

----- Original Message -----
From: "Jon Peltier"
Newsgroups:
microsoft.public.office.developer.vba,microsoft.pu blic.excel.programming,microsoft.public.excel.misc ,microsoft.public.excel
Sent: Sunday, March 04, 2007 9:59 AM
Subject: how to get around the Enable Macro security message?


A very nice example of this is found in chapter 20 of the Professional
Excel Development book by Bullen, Bovey, and Green. Under the Practical
Examples at the end of the chapter, look for "Standard EXE - Creating a
Front Loader for Your Excel Application". This book is full of many
practical examples like this one.

Here's a link to the book:
http://www.amazon.com/exec/obidos/re...&creative=9325

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Jon Peltier" wrote in message
...
Another option is to write a program in VB which opens the workbook for
you. Workbooks which open through automation are implicitly trusted,
since the program that opens them (the VB program) are assumed to have
been opened on purpose.

This approach is good for unsophisicated users, as you can put an icon
for the VB program on the desktop for the users to launch the program.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"cfman" wrote in message
...
HI all,

When the users open my Excel/VBA sheet, they met with a window asking if
Macro should be enabled.

My users are not that sophisticated... so I would like everything simple
for them. Is there a way to get rid of such complications?

Thanks