FIX: OLE Automation to Excel 8.0 Fails Using a 16-bit ClientID: Q170402
|
If you use a 16-bit Visual Basic client to Automate Microsoft Excel 97 under Windows 95, you may receive the following error:
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."<application> caused an invalid page fault in module kernel32.dll"
There are several solutions to this problem.
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.
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.
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
Additional query words: XL97 XL8 16bit ipf crash
Keywords : kbnokeyword kbExcel kbVBp300bug kbVBp400bug kbWinOS98fix kbGrpDSO kbOffice2000
Version : :; WINDOWS:3.0,4.0,97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: June 4, 1999