Microsoft KB Archive/287567

= Considerations for disabling VBA in Office =

Article ID: 287567

Article Last Modified on 3/23/2007

-

APPLIES TO


 * Microsoft Office Basic 2007
 * Microsoft Office Enterprise 2007
 * Microsoft Office Home and Student 2007
 * Microsoft Office Professional 2007
 * Microsoft Office Small Business 2007
 * Microsoft Office Standard 2007
 * Microsoft Office Ultimate 2007
 * Microsoft Office Standard Edition 2003
 * Microsoft Office XP (Setup)

-



This article was previously published under Q287567



INTRODUCTION
This article discusses why you may want to disable Microsoft Visual Basic for Applications (VBA) for Microsoft Office. This article also describes the effects of disabling VBA on some Office features and on some custom Office solutions.



MORE INFORMATION
You can disable VBA in Office in two ways:
 * During the Office Setup process, you can choose not to install VBA.
 * During the Office Setup process, you can choose to install VBA together with Office and then disable VBA.

If you choose not to install VBA during the Setup process, VBA functionality will not be available. When Office programs start, the programs examine the Windows Installer database to determine whether VBA was installed together with Office. If VBA was not installed together with Office, the Office programs will not use VBA, even if VBA was installed together with another program.

If you choose to install VBA together with Office and then disable VBA, you can disable VBA by using system policies. If you use system policies on a computer that has multiple users, you can select which users have VBA functionality. For more information about how to disable VBA, click the following article number to view the article in the Microsoft Knowledge Base:

281954 How to turn off Visual Basic for Applications when deploying Office 2003 or Office XP



Although disabling VBA provides a high level of macro security, disabling VBA can severely affect custom Office VBA solutions. You must consider whether the added protection outweighs the limitations that disabling VBA has on you or on your organization.

Disabling VBA for Office can have far-reaching implications. Some of these include the following:  You cannot install Microsoft Access. You cannot create or run VBA macros in any Office program. You cannot create or run Microsoft Excel 4.0 Macro Language (XLM) macros in Excel. You cannot use ActiveX controls in Office documents because these controls are disabled. Note that this includes Forms 2.0 controls. You cannot use some wizards. When you try to use an affected wizard, you receive a message that is similar to the following:

C:\Program Files\Microsoft Office\Templates\1033\ .wiz contains macros. Macro language support is disabled in this application. Would you like to open a copy of this document with the macros removed?

Note  is the file name of the wizard that you are trying to use. You cannot use non-compiled add-ins because these add-ins are disabled. Note that this includes certain add-ins that are included with Office, such as the Analysis ToolPak for Excel.

Note For more information about Office features that are unavailable when VBA is disabled, see the &quot;References&quot; section.</li></ul>

Disabling VBA provides a high level of macro security because disabling VBA prevents macros from running in documents and in non-compiled add-ins such as Excel .xla add-in files. When VBA is disabled, you can still use add-ins that are compiled, such as Excel .xll add-in files, Word .wll add-in files, and Automation Add-ins. Automation to Office programs is still available. However, you may not be able to use certain methods or properties that use VBA. If you are developing an Automation client or an Automation Add-in that may be deployed to computers on which VBA may be disabled, you should test the code to make sure that the code works when VBA is disabled.

<div class="references_section">