Microsoft KB Archive/811325

= &quot;This Program Has Performed an Illegal Operation&quot; Error Message When You Start Visual Basic Editor =

Article ID: 811325

Article Last Modified on 1/9/2006

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition
 * Microsoft Excel 2000 Standard Edition

-



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When you start Visual Basic Editor in Microsoft Word or in Microsoft Excel, you may receive the following error message:

This program has performed an illegal operation and will be shut down.

If the problem persists, contact the program vendor.



CAUSE
This behavior may occur if the corresponding registry entry for Microsoft Visual Basic for Applications (VBA) is damaged.



RESOLUTION
To resolve this behavior, delete the following key in the Windows registry: 

The registry key is re-created the next time you start Visual Basic Editor. To delete this registry key, follow these steps:

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.  Quit Word or Excel (if it is running). Export the   registry key to a .reg file. To do so:  Click Start, and then click Run. In the Open box, type regedit, and then click OK. Locate, and then click the following registry key:

 On the File menu, click Export.</li> Type a name for the .reg file in the File name box, specify a location where you want to save the file (for example, the My Documents folder), and then click Save.</li></ol>

Note: If you ever have to undo the registry changes that you make in the next step, you can do so by double-clicking this exported .reg file.</li> Delete the   registry key. To do so: <ol style="list-style-type: lower-alpha;"> Right-click the   key that you located in step 2c, and then click Delete.</li> Click Yes when you are prompted to confirm the deletion.</li></ol> </li> Quit Registry Editor.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
To start Visual Basic Editor in a Microsoft Office 2000 program, follow these steps:
 * 1) Start the Office 2000 program.
 * 2) Do one of the following:
 * 3) * On the Tools menu, point to Macro, and then click Visual Basic Editor

-or-
 * 1) * Press ALT+F11.

Keywords: KB811325

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.