Microsoft KB Archive/157104

= XL97: Errors When Trying to Make Office Assistant Visible =

Article ID: 157104

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q157104



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:


 * The workbook contains a Workbook_Open macro. -and-


 * The Workbook_Open macro contains a command to make the Office Assistant window visible. -and-


 * Microsoft Excel 97 is not currently running.



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 a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

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:

 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.)  In the ThisWorkbook (Code) window, enter the following code: Sub Workbook_Open Application.OnTime Now + TimeValue("00:00:15"), "ShowAssistant" End Sub  Click Module on the Insert menu.  In this module sheet, enter the following code: Sub ShowAssistant Application.Assistant.Visible = True End Sub  Save and close your file.

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

<div class="status_section">

STATUS
Microsoft 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.

<div class="moreinformation_section">

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: kbdtacode kbenv kbprb KB157104

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.