Article ID: 159964 - Last Review: October 10, 2006 - Revision: 2.3 Pointer Is an Hourglass When You Display a Message BoxThis article was previously published under Q159964 On This PageSYMPTOMS
When you run a Visual Basic for Applications macro in Microsoft Excel 97,
if the macro uses the MsgBox function to display a message box on the
screen, the pointer may appear as an hourglass or as the arrow pointer.
When you dismiss the message box, the pointer behaves normally again.
This behavior may lead you to believe that Microsoft Excel 97 has stopped responding, or is waiting for some event to occur. CAUSE
When you display a message box, the pointer behaves slightly differently
in Microsoft Excel 97 than it does in earlier versions of Microsoft Excel.
When you run a Visual Basic for Applications macro, if you use the MsgBox function to display a message box on the screen, macro processing halts for as long as the message box remains on the screen. When you click OK, the macro continues to run. This behavior is by design of Microsoft Excel. NOTE: If you run the macro from within the Visual Basic Editor, or if you run the macro by clicking a toolbar button, the pointer does not appear as an hourglass. RESOLUTION
If the pointer appears as an hourglass when you display a message box in
Microsoft Excel 97, move the pointer inside the message box.
NOTE: If the pointer changes into a arrow pointer, and you can click a button in the message box, Microsoft Excel is behaving normally. MORE INFORMATIONMicrosoft 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. Example MacroThe following macro displays a message box:When you run the macro in Microsoft Excel 5.0 or 7.0, the pointer appears as a normal arrow pointer without regard to where you position it on the screen. In Microsoft Excel 97, the pointer appears as a normal arrow pointer only when you position it inside the message box. Otherwise, it appears as an hourglass. When you click OK, the pointer behaves normally again. Pointer BehaviorTo properly reflect the fact that other macro processing halts temporarily, Microsoft Excel 97 changes the pointer to an hourglass. The pointer appears as an hourglass when the following conditions are true:
APPLIES TO
| Article Translations
|

Back to the top
