Microsoft KB Archive/933745

= The Winword.exe process uses an average of 50 percent of the CPU resources when you try to debug VBA code or run a modal UserForm in Word 2007 =

Article ID: 933745

Article Last Modified on 4/10/2007

-

APPLIES TO


 * Microsoft Office Word 2007

-



SYMPTOMS
In Microsoft Office Word 2007, you experience one of the following symptoms:
 * Symptom 1

When you try to debug Visual Basic for Applications (VBA) code in Visual Basic Editor, the Winword.exe process uses an average of 50 percent of the CPU resources in Windows Task Manager.
 * Symptom 2

When you try to run a modal UserForm in Visual Basic Editor, the Winword.exe process uses an average of 50 percent of the CPU resources in Windows Task Manager.

Note By default, when you insert a UserForm into a VBA project, the UserForm is a modal UserForm.



STATUS
Microsoft is researching this problem and will post more information in this article when the information becomes available.



WORKAROUND
To work around the problem that occurs when you try to run a modal UserForm in Visual Basic Editor, you can make the modal UserForm a modeless UserForm. To do this, follow these steps:  In Visual Basic Editor, double-click ThisDocument in the Project Explorer window.  Add one of the following VBA code samples in the ThisDocument (Code) window.

Sample 1 Sub showform .Show vbModeless End Sub Sample 2 Sub showform .Show 0 End Sub Note  is the name of the UserForm that is displayed in the Project Explorer window. 



Steps to reproduce problem 1
 Create a new document in Word 2007. On the Developer tab, click Visual Basic in the Code group to start Visual Basic Editor.</li>  In the Project Explorer window, double-click ThisDocument, and then add the following code. Sub Hello MsgBox &quot;Hello&quot; End Sub </li> On the Debug menu, click Step Into.</li> Start Windows Task Manager, and then click the Processes tab.

Notice that the Winword.exe process uses an average of 50 percent of the CPU resources.</li></ol>

Steps to reproduce problem 2

 * 1) Start Word 2007.
 * 2) On the Developer tab, click Visual Basic in the Code group to start Visual Basic Editor.
 * 3) On the Insert menu, click UserForm.
 * 4) On the Run menu, click Run Sub/UserForm.
 * 5) Start Windows Task Manager, and then click the Processes tab.

Notice that the Winword.exe process uses an average of 50 percent of the CPU resources.

Additional query words: spike spikes usage

Keywords: kbtshoot kbexpertisebeginner kbprb KB933745

-

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

© Microsoft Corporation. All rights reserved.