Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default selective macro security

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default selective macro security

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
--
Gary''s Student - gsnu200722
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default selective macro security

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 StartProgramsMicrosoft OfficeOffice Tools and build a selfcert from
there.

When complete and your workbook is open go to VBEditor and ToolsDigital
SignatureChoose.

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

On Wed, 16 May 2007 12:47:02 -0700, Gary''s Student
wrote:

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default selective macro security

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?

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200722

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default selective macro security

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.
--
HTH...

Jim Thomlinson


"Montana" wrote:

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?

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200722



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default selective macro security


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




--
Gary''s Student - gsnu200722


"Montana" wrote:

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?

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200722

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selective Macro Security in Excel 2007 DOUG Excel Discussion (Misc queries) 0 April 2nd 09 06:10 PM
Macro Security Barry Lennox[_2_] Excel Discussion (Misc queries) 7 April 1st 09 08:15 PM
Macro needed to set macro security in Excel to minimum Carl Excel Programming 3 March 18th 06 03:36 PM
Macro Security Mike Goodson Excel Discussion (Misc queries) 0 October 10th 05 06:16 PM
Run a macro to copy selective items chrisdtran Excel Discussion (Misc queries) 2 August 12th 05 04:42 PM


All times are GMT +1. The time now is 08:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"