The information in this article applies to:
SYMPTOMSWhen you view a Microsoft Excel worksheet in Microsoft Internet Explorer, version 3.0 or 3.01, and run a Visual Basic for Applications macro, Microsoft Excel may not redraw the worksheet correctly after the macro is finished running. When this behavior occurs, cells and objects in the worksheet may not appear to be updated by the macro. CAUSEThis problem may occur when you run a macro that turns off screen updating with the following line of code:
The problem will occur even if your macro also includes the following line
of code:
WORKAROUNDMicrosoft 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/support/supportnet/overview/overview.aspTo work around this behavior, use either of the following methods. Method 1You can force the worksheet to be redrawn correctly by resizing the Microsoft Internet Explorer window in any way. For example, resize the window by doing any of the following:
Method 2If the macro includes the following line of code:
you can force the worksheet to redraw correctly programmatically by
displaying a different section of the worksheet and returning to the cell
range you originally selected. When you do this, you force the screen to be
redrawn, which prevents the problem from occurring. To do this, add the
following lines of code to the end of the macro immediately before the "End
Sub" line:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATIONIn Microsoft Excel, you can disable screen updating while running a macro by adding the following line of code:
Screen updating remains disabled until the macro finishes running or you
re-enable updating by setting the ScreenUpdating property to True.
If you run a macro that sets ScreenUpdating to False while you view a worksheet in Microsoft Internet Explorer, ScreenUpdating is not correctly re-enabled when the macro is finished running. Additional query words: 97 XL97
Keywords : kbdta kbdtacode xlui KbVBA xlweb |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |