XL97: Errors When Trying to Make Office Assistant Visible

ID: Q157104

The information in this article applies to:

SYMPTOMS

When you open a Microsoft Excel workbook in Microsoft Internet Explorer, you may receive one or more of the following error messages:

   Run-time error '-2147467259 (80004005)':
   Operation cannot be performed when the application is inactive.

    -or-

   Microsoft Excel is waiting for another application to complete an OLE
   action.

    -or-

   EXCEL caused an invalid page fault in module KERNEL32.DLL at
   014f:bff9a141.

    -or-

   EXCEL caused an invalid page fault in module VBA332.DLL at
   014f:65155893.

and Microsoft Internet Explorer stops responding.

Or, when you click "Add From File" on the Section menu in Microsoft Office Binder 97 and add a Microsoft Excel workbook to a binder, Microsoft Office Binder 97 stops responding.

CAUSE

This will occur if the following conditions are true:

WORKAROUND

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

If this problem occurs, you can use the OnTime method to delay making the Office Assistant visible. By delaying the process, you can prevent the problem from occurring.

To do this, follow the steps below:

1. In the Visual Basic Editor, activate the ThisWorkbook (Code) window.

   (In the Project Explorer window, click ThisWorkbook and then click
   Code on the View menu.)

2. In the ThisWorkbook (Code) window, enter the following code:

   Sub Workbook_Open()
      Application.OnTime Now + TimeValue("00:00:15"), "ShowAssistant"
   End Sub

3. Click Module on the Insert menu.

4. In this module sheet, enter the following code:

   Sub ShowAssistant()
      Application.Assistant.Visible = True
   End Sub

5. Save and close your file.

The next time you open this file from Microsoft Internet Explorer or Microsoft Binder, the Assistant will display correctly.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

In Microsoft Excel 97, workbooks can contain a "Workbook_Open" macro. This macro is stored in the ThisWorkbook (Code) window for a workbook and runs automatically when the workbook is opened.

If a Workbook_Open macro contains a command to display the Office Assistant window:

   Application.Assistant.Visible = True

the workbook will not open correctly in either Microsoft Internet Explorer or Microsoft Office Binder 97, if Microsoft Excel 97 is not already running.

Additional query words: XL97 auto_open auto open hang hangs

Keywords          : kbenv kbdta kbdtacode xlui KbVBA 
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: May 18, 1999