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.

Error message when you cancel the installation of Visual Basic for Applications: "An error occurred"


View products that this article applies to.

Symptoms

If you cancel the installation of Microsoft Visual Basic for Applications (VBA) in Microsoft Excel, you may receive an error message that is similar to the following:
An error occurred initializing the VBA libraries (1004)

↑ Back to the top


Cause

This behavior can occur when all of the following conditions are true:
  • If VBA is set to install on first use when you install Excel or Microsoft Office.

    -and-
  • You have not yet used VBA in this installation of Excel or Microsoft Office.

    -and-
  • You press ALT + F11 to open Visual Basic Editor, and then click No when prompted to install VBA.

↑ Back to the top


Resolution

To prevent this issue from occurring, follow these steps to install VBA:
  1. Start Excel.
  2. You press ALT + F11 to open Visual Basic Editor.
  3. When prompted to install VBA, click Yes.

↑ Back to the top


Keywords: KB813970, kbprb

↑ Back to the top

Article Info
Article ID : 813970
Revision : 3
Created on : 6/20/2014
Published on : 6/20/2014
Exists online : False
Views : 288