WD: Some Screen Items Update with ScreenUpdating Set to 0

Last reviewed: February 11, 1998
Article 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 97 for Windows
  • 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 97 and 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:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office
               Program or Component

Word 7.x and Earlier

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.

MORE INFORMATION

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 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 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/ 


Additional query words: change flicker echo on off zero
Keywords : kbmacroexample kbwordvba macword winword word6 word7 word8 word95 word97 macword98 kbcode kbmacro kbprg
Version : WINDOWS:2.0,2.0a,2.0a- CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a,97; MACINTOSH:6.0,6.0.1,6.0.1a,98
Platform : MACINTOSH WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 11, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.