WD: Some Screen Items Update with ScreenUpdating Set to 0

ID: Q110012


The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 98 Macintosh Edition


SYMPTOMS

Toolbars may flash on and off, and document names may change when a macro is run with ScreenUpdating set to 0 (zero).


CAUSE

Word 98 Macintosh Edition

The ScreenUpdating property controls most display changes on the screen while a procedure is running. When screen updating is turned off, toolbars remain visible and Word still allows the procedure to display or retrieve information using status bar prompts, input boxes, dialog boxes, and message boxes. You can increase the speed of some procedures by keeping screen updating turned off. You must set the ScreenUpdating property to True when the procedure finishes or stops after an error.

For more information about Screen Updating, while in the Visual Basic for Applications Editor, click the Office Assistant, type "ScreenUpdating," click Search, and then click to view "ScreenUpdating Property."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Visual Basic Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:
Q120802 Office: How to Add/Remove a Single Office Program or Component

Word 7.x and Earlier

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals 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 needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/supportnet/refguide/
WordBasic Help states that the ScreenUpdating statement is responsible for most changes on the screen while a macro is running. When screen updating is turned off (set to 0), Word still allows the macro to display or retrieve information using status bar prompts, input boxes, dialog boxes, or message boxes.

When a macro performs an action that has a corresponding toolbar icon, the toolbar flashes on the screen. The following sample macro flashes the header/footer toolbar:

   Sub MAIN
      ScreenUpdating 0
      ViewHeader
      Insert "Header Text"
      CloseViewHeaderFooter
   End Sub 
Other screen updates include the document title bar if the name of the active document changes.

Additional query words: change flicker echo on off zero

Keywords : kbmacro kbprg kbdta kbdtacode kbmacroexample kbwordvba macword98 winword macword word6 word7 word95
Version : MACINTOSH:6.0,6.0.1,6.0.1a,98; WINDOWS:6.0,6.0a,6.0c,7.0,7.0a; winnt:6.0
Platform : MACINTOSH WINDOWS winnt
Issue type : kbprb


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.