UserForm appears to cause Word to stop responding (273905)



The information in this article applies to:

  • Microsoft Office Word 2003
  • Microsoft Word 2002

This article was previously published under Q273905

For a Microsoft Word 2000 version of this article, see 220560.

SYMPTOMS

When you use a UserForm in Microsoft Visual Basic for Applications to create a new document, the document that is active before you create the new document remains active.

If you switch to the newly created document using the Microsoft Windows taskbar, the UserForm disappears and Microsoft Word appears to stop responding (hang).

CAUSE

Word has not actually stopped responding. This behavior occurs because the UserForm's ShowModal property is set to True. If the ShowModal property of a UserForm is set to True, you cannot work in the parent program of the UserForm until the UserForm has been dismissed.

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To resolve this issue, set the ShowModal property of your UserForm to False. To do so, follow these steps:
  1. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  2. In the Project window, double-click the UserForm that you want.
  3. On the View menu, click Properties Window.
  4. In the Properties window, scroll to view ShowModal.

    NOTE: Ensure that you are in the UserForm Properties window and not in a UserForm control property window.
  5. Change the value of the ShowModal property to False.
  6. On the File menu, click Save your project name.
  7. On the File menu, click Close and Return to Microsoft Word.

WORKAROUND

To access your UserForm, press ALT+TAB. After the UserForm appears, you can quit the UserForm and regain control of Word.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbnofix KB273905