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)
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.
- You have not yet used VBA in this installation of Excel or Microsoft Office.
- You press ALT + F11 to open Visual Basic Editor, and then click No when prompted to install VBA.
To prevent this issue from occurring, follow these steps to install VBA:
- Start Excel.
- You press ALT + F11 to open Visual Basic Editor.
- When prompted to install VBA, click