Microsoft KB Archive/170402

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

Article ID: 170402

Article Last Modified on 10/26/2005

-

APPLIES TO


 * Microsoft Office 2000 Developer Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 3.0 Professional Edition, when used with:
 * Microsoft Windows 95
 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q170402



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

" 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://msdn.microsoft.com/library/default.asp 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. This problem has been fixed in Microsoft Windows 98.



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
 Create a new Visual Basic 4.0 16-bit project. Add a CommandButton to Form1.  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  Run the project by pressing the F5 Key. Click the CommandButton.</ol>

Additional query words: XL97 XL8 16bit ipf crash

Keywords: kbbug kbfix kboswin98fix KB170402

-

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

© Microsoft Corporation. All rights reserved.