XL: OLE Automation Dialog Box Redrawn Incorrectly

Last reviewed: September 2, 1997
Article ID: Q112630

The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0
  • Microsoft Excel for Windows 95, version 7.0

SYMPTOMS

In Microsoft Excel, if you use OLE Automation to control another application, and if you display a dialog box from that application, the dialog box may not be correctly redrawn when you move it on the screen.

Also, if you switch to Microsoft Excel (for example, by pressing ALT+TAB) without dismissing the dialog box, Microsoft Excel may appear to hang. This is by design.

CAUSES

Dialog Box Is Not Redrawn Correctly

This error occurs because of the way in which dialog boxes are handled in OLE Automation. If you display a dialog box from another application, Microsoft Excel is temporarily "frozen" until the dialog box is dismissed. When Microsoft Excel is frozen this way, it does not have the ability to redraw parts of the screen that are occupied by a dialog box, and you may see "ghost" images of the dialog box that only disappear when control is returned to Microsoft Excel. The only solution to this problem is to not move dialog boxes that are shown by OLE Automation.

The redraw behavior used by Microsoft Excel is different than that used by Microsoft Visual Basic for Windows, version 3.0. Visual Basic version 3.0 has the ability to redraw parts of the screen, eliminating the "ghost" images, because of the way that Visual Basic handles dialog boxes that are shown by OLE Automation.

Microsoft Excel Hangs When a Dialog Box Is Displayed

Microsoft Excel cannot be accessed when a dialog box called through OLE Automation is still on the screen.

If you switch back to Microsoft Excel without dismissing the dialog box, an hourglass will appear and Microsoft Excel will appear to hang. If this occurs, you should switch to the dialog box by pressing ALT+TAB and dismiss the dialog box before returning to Microsoft Excel.


Additional query words: 5.00 lock up freeze doesn't respond
Keywords : IntpOthr kbprg PgmOthr kbprg
Version : 5.00 7.00
Platform : WINDOWS


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: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.