Changing macro security causes VBA code to fail

A

andy.kai.chan

Hoping someone has an answer to this one. Using 2003, I've created
some VBA macros which work fine when the security level is set to
"enable all macros". However, when the security is changed to "disable
with notification" in 2007, it sometimes fail.

The scary part is that it is inconsistent. If I set a break point, and
step through it, it works fun. When I take out the break point, it
will crash.

The last set of errors comes from Excel not understanding the
currentregion property of the active cell. Once this code has been
changed, all of a sudden, the pivot table code fails.

What's really frustrating is that even if I make a minor tweak, and
successfully run through the VBA code, I can close it, shut down
Excel, then re-open the file in Excel, and it will fail again!!

But, this only seems to happen when the security setting is "disable
with notification".
 
O

OssieMac

You need to consider your personal situation but I find the Trusted Locations
saves me a lot of hassel with my own developed applications. Look up Trusted
Locations in help.
 
A

ahkai

You need to consider your personal situation but I find the Trusted Locations
saves me a lot of hassel with my own developed applications. Look up Trusted
Locations in help.

--
Regards,

OssieMac









- Show quoted text -

Thanks OssieMac. We actually have a certificate for the file too.
Trusted locations are an issue, as we have 1000's of users of this
Excel form. Thanks for the feedback though.
 

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