selective macro security

G

Guest

Is there a way to set macro security to 'low' for a specific workbook? I have
a workbook with macros that I use all the time & I would like to turn off the
pesky, 'Disable macros', 'Enable macros,' etc. dialog box for this trusted
program, but I don't necessarily want to throw all security to the wind. Any
ideas out there?
 
G

Guest

Sub sec()
Application.SendKeys ("%tms")
Application.SendKeys ("%l")
Application.SendKeys "{ENTER}"
DoEvents
End Sub

will set the security level to low. It works by playing against the
standard menu bar:

Tools > Macros > Security
 
G

Gord Dibben

Might be easier just to create a SelfCert signature for use on your computer.

You can sign the workbook and get rid of the "enable macros" without changing
security level to low.

For the macros warning, if just for your own use on your computer, you can use
the SelfCert tool to create a certificate that sets the macros in a workbook to
"Trusted" and does not display the macros warning.

Check out Help on Digital Signing and the the Self-Cert utility which allows you
to sign your projects on your own computer only.

Self-cert digital signatures are not exportable as are paid-for ones from Thawte
and Versisign.

Go to Start>Programs>Microsoft Office>Office Tools and build a selfcert from
there.

When complete and your workbook is open go to VBEditor and Tools>Digital
Signature>Choose.

Select the one you just created and Ok your way out.

Save the workbook and re-open. Click "Yes" when asked about "trusted whatever".

You won't see the macro message again for that workbook.


Gord Dibben MS Excel MVP
 
G

Guest

Thanks for your input. But I put this in by right clicking on the worksheet
tab & pasting it, then saving & closing the program & it still comes up just
the same when I restart. I must not be doing something right. What do you
think?
 
G

Guest

The issue that you have is the cart before the horse. You are trying to run a
macro that will tell the system whether it is allowed to run macros... go
with Gord's solution.
 
G

Guest

Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the macro from Excel:

1. ALT-F8
2. Select the macro
3. Touch RUN

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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

Top