Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Considerations for disabling VBA in Office


View products that this article applies to.

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.

↑ Back to the top


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

↑ Back to the top


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\wizard name.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 wizard name 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 "References" section.
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.

↑ Back to the top


References

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

282847 Some Excel features are unavailable if you disable Visual Basic for Applications and run Excel

↑ Back to the top


Keywords: kb, offrtmpublic, kboffice10ready, kbhowto, kbdsupport, kbautomation, kbbillprodsweep

↑ Back to the top

Article Info
Article ID : 287567
Revision : 7
Created on : 8/20/2020
Published on : 8/20/2020
Exists online : False
Views : 353