Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 933745 - Last Review: April 10, 2007 - Revision: 1.1
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
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.
Microsoft is researching this problem and will post more information in this article when the information becomes available.
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 1Sub showform()
<UserFormName>.Show vbModeless
End Sub
Sample 2Sub showform()
<UserFormName>.Show 0
End Sub
Note UserFormName 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.
- In the Project Explorer
window, double-click ThisDocument, and then add the following code.
Sub Hello()
MsgBox "Hello"
End Sub
- On the Debug menu, click Step
Into.
- 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.
Steps to reproduce problem 2
- Start Word 2007.
- On the Developer tab, click Visual Basic in the
Code group to start Visual
Basic Editor.
- On the Insert menu, click
UserForm.
- On the Run menu, click Run
Sub/UserForm.
- 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.
APPLIES TO
- Microsoft Office Word 2007
| kbtshoot kbexpertisebeginner kbprb KB933745 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate