View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default How can I suppress the enable macros and save changes messages?

To prevent changes, change the file to Read Only in Windows Explorer (select
the file, right-click, select Properties, check Read Only, click OK). To
prevent the "Save Changes" message when closing the workbook, put the
following event code in the ThisWorkbook module of the workbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

You can't suppress/change/bypass the "Enable Macros" dialog when the
workbook is opened. If you could, what would be the use of security settings
to disable macros? If the users of the workbook change their macro security
settings to Low, they won't get the "Enable Macros" dialog, but this is not
recommended.

Provided the security level is set to only allow "signed" macros (with a
certificate) on all machines involved:
Attach a personal certificate to your workbook (digitally sign the VBA
project. You can create your own digital signature using SelfCert, at
Application.Path & "\SelfCert.exe". )
Send your workbook to your users.
When they first open the workbook, after choosing "view the certificate" or
"view details", they will have the choice to install the attached
certificate, once done, they will be able to allow all macros from this
certicate, once and for all.

Hope this helps,

Hutch

"Ron in Walnut Creek" wrote:

I have a multi-worksheet "Dashboard" that is viewed by numerous people. I
want to prevent changes (protect) and suppress the "Enable Macros" message
(default to YES) when opening the workbook and the "Save Changes" message
(default to NO) when closing the workbook.