19.3. Choosing a Suitable Level of Security

To use VBA macros safely, you or a user of your code must choose a suitable level of security — high enough to avoid the threats posed by malicious or incompetent code, but low enough that it doesn't prevent you from running useful, safe code.

19.3.1. Understanding the Security Threats Posed by VBA

As macro languages have grown in power and sophistication over the years, so has the threat they pose when misused. Using relatively simple VBA commands, you can create files, delete files, manipulate existing data, and control other applications.

Even code developed with the best of intentions can damage a computer when run under unsuitable circumstances — for example, a procedure might delete valuable ...

Get Mastering VBA for Microsoft Office 2007, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.