BUG: OLE Automation to Excel 8.0 Fails Using a 16-bit Client

Last reviewed: August 13, 1997
Article ID: Q170402
The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions, 16-bit only, for Windows, version 4.0 on the following platform: Win95
  • Microsoft Visual Basic Professional Edition for Windows, version 3.0 on the following platform: Win95
  • Microsoft Excel 97 for Windows

SYMPTOMS

If you use a 16-bit Visual Basic client to Automate Microsoft Excel 97 under Windows 95, you may receive the following error:

  "<application> caused an invalid page fault in module kernel32.dll"

This error only occurs on Windows 95 with Microsoft Excel 97. The error does not happen on Windows NT 4.0 or with Microsoft Excel 95.

RESOLUTION

There are several solutions to this problem.

  • Use a 32-bit client.

    -or-

  • Use Windows NT 4.0.

    -or-

  • Install DCOM for Windows 95. DCOM for Windows 95 can be downloaded from the Microsoft Web Site at the following address:

          http://www.microsoft.com/oledev
    

A License and Distribution Agreement can also be found at the above Web Site.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following example only fails on Windows 95 using a 16-bit client application to Microsoft Excel 97. This will only fail on machines that do not have DCOM for Windows 95 installed.

Steps to Reproduce Behavior

  1. Create a new Visual Basic 4.0 16-bit project.

  2. Add a CommandButton to Form1.

  3. Add the following code to Form1:

          Dim oExcel as object
    

          Private Sub Form_Load()
    
            Set oExcel = CreateObject("Excel.Application")
          End Sub
    
          Private Sub Command1_Click()
            oExcel.Workbooks.add
            oExcel.Visible = True
            'The error usually happens on one of the next 3 lines
            oExcel.Sheets(1).Activate
            oExcel.Range("a1").Value = 1
            oExcel.Range("a2").Value = 2
          End Sub
    
    

  4. Run the project by pressing the F5 Key.

  5. Click the CommandButton.


Additional query words: XL97 XL8 VB4 16bit ipf crash
Keywords : IAPVBA vb416 VB4WIN kberrmsg
Version : 3.0 4.0 97
Platform : Win95 WINDOWS
Issue type : kbbug


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