Unable to run a macro within Excel if the VB code is password protected

V

Vivo

I am unable to run a macro within Excel if the VB code is password
protected. If the VB code is not password protected it runs
successfully. I need to find a way to secure the code and yet still
run the macro since we will be rolling this out to users.

Thanks.
 
D

Dave Peterson

The only thing I can think of that would fail if the project is protected is
some kind of code that tries to modify the project--or maybe access that
project???

If you're doing that, I don't think you have a choice except for unprotecting
the project. (There's no reliable way to unprotect the project, modify it, and
reprotect it.)

Is your code trying to do that--or is it something else?
 
V

Vivo

No, not trying to do that, but I found out specifically that the Save
As method fails when the project is protected and it runs fine when it
is not.
 
D

Dave Peterson

Is it excel failing or is it an over-aggressive antivirus program that's causing
the failure?

(I've never seen either, by the way.)
 
V

Vivo

Its Excel that fails.... I cannot seem to find anything that addresses
that situation. Do I need to get a digital signature? Do you think
that will fix the problem? Could it be the macro security setting not
at the correct level?
 
Top