Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

How to change the macro security level ?

  Asked By: Nisha    Date: Dec 27    Category: MS Office    Views: 799
  

Does anybody know if it is possible to change the macro security level
using VBA ?

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Bodhi Smith     Answered On: Dec 27

. Why do you want to do this??

 
Answer #2    Answered By: Charlotte Brown     Answered On: Dec 27

I certainly hope not, at least for the workbook being opened --
otherwise that setting would be useless as a security  tool.

 
Answer #3    Answered By: Abbie Hughes     Answered On: Dec 27

because all my macros in my workbook didn't work in High or Medium
level

 
Answer #4    Answered By: Myrtle Wilson     Answered On: Dec 27

Well, in "High", only signed macros from trusted sources can run. In
"Medium", a dialog box should pop up at the time you open the
workbook, asking you if it is OK to run macros, or whether they should
be disabled.

 
Answer #5    Answered By: Cain Smith     Answered On: Dec 27

I'm not with you ... why no just change  the level  using the normal menu?

 
Answer #6    Answered By: Aaeedah Khan     Answered On: Dec 27

I do not think it is possible to do this from VBA.

The reason for this is that if you could change  the security  level from VBA,
it would be a massive security failing which would allow anyone access to
everyone's computer.

 
Answer #7    Answered By: Lucio Ferrrari     Answered On: Dec 27


I have been playing with this for months. Our company tightened up
security policies, and now, whatever I select the macro  security level
to be, it defaults to High at next Excel start. So I wanted to
programmatically change  it.

But, no joy anywhere on the web. I had to resort to digitally signing
all my workbooks' code, but now it all works again.

You may also find on other groups that people are hesitant to answer
your particular question, as the technique can be used by hackers to run
malicious code on someone's computer.

If your specific query is about someone else's computer executing your
code, there is no alternative but to have them accept your security
certificate as valid, or alternatively Enable Macros on every open of
the workbook.

As much as I rebelled against the extra steps, I know why the company
needs the protection, and thus in the end I conformed!

 
Didn't find what you were looking for? Find more on How to change the macro security level ? Or get search suggestion and latest updates.




Tagged: