Programmatically check security of VB Project

W

WLMPilot

I have a macro that I want to write code for various commandbuttons that are
created via macro. I manually put a check in the "Trust access to Visual
Basic Project" spot under Tools>Macro>Security. But it keeps unchecking
itself.

Is there a way for me to check the status of "Trust access to Visual Basic
Project" and if there is not a checkmark, place one in there via a macro?

Thanks,
Les
 
J

JLGWhiz

Les, when you check the allow access box, do you exit by clicking OK or by
clicking the big red X? If you use the big red X, then you do not set the
check mark. You must click OK to exit after you put the check in the box.
It has to be manually changed back after that. I don't know of a way that it
would automatically uncheck itself. Mine has been checked for four years and
has not changed.
 
J

JLGWhiz

Just to be as accurate as possible, the box won't uncheck itself unless you
somehow reset everything to default. The default condition is unchecked, and
that is the setting recommended by Microsoft to prevent spyware or remote
hackers from accessing your code.
 
W

WLMPilot

I believe I clicked on OK. Something kept happening when I would execute the
program that would cause it to crash (and I saved the workbook), but it would
be unchecked after that. I will see what happens.

Thanks,
Les
 

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