The information in this article applies to:
SYMPTOMSWhen you run a Visual Basic for Applications macro in Microsoft Excel, the following problems may occur:
CAUSEThis problem may occur when the following conditions are true:
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 a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/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 problem, wait for the macro to finish running. After the macro is finished, Microsoft Excel 97 updates the screen. If you wait for a long time and the macro does not finish running, it may be necessary to end the instance of Microsoft Excel 97 by pressing CTRL+ALT+DEL. Although it is not possible to prevent this problem from ever occurring, you can lessen its affects by adding MsgBox commands to the Visual Basic macro. For example, assume you are running the following Visual Basic macro:
When you run this macro, switch to another program, and then switch back
to Microsoft Excel 97, you may not be able to halt the macro by pressing
ESC. Also, the screen may not be updated properly until the macro is
finished. However, you can add message boxes that allow the screen to be
updated. For example, type the following subroutine:
When each loop is completed, the macro displays a message box. When you
click OK, the screen is updated properly, and you can halt the macro by pressing ESC.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem no longer occurs in Microsoft Excel 2000. MORE INFORMATIONThis problem occurs even if the Visual Basic macro contains one of the following lines of code:
-or-
Additional query words: 97 XL97 vba hang hangs hanging hung lock up locks locking locked lockup freeze freezes freezing froze frozen stop stopping stopped won't respond waiting
Keywords : kbprg kbdta kbdtacode OffVBA KbVBA |
Last Reviewed: November 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |