tesko Newbie
Joined: 08 Jan 2004 Posts: 1
|
Posted: Jan 8th, 2004 10:19 AM Post subject: Excel 97 automation with VB.NET |
|
|
Hello,
I've been trying so many different methods for automating Excel 97 with VB.NET and I keep getting the same error.
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Reception.exe
Additional information: The server threw an exception.
This only happens with Excel 97, not Word 97. Here is the latest code I've tried.
Dim oExcel As Excel.Application
Dim oWorkbooks As Excel.Workbooks
Dim oSheets As Excel.Sheets
Dim oWB As Excel.Workbook
Dim oWS As Excel.Worksheet
Dim oRng1, oRng2 As Excel.Range
oExcel = New Excel.Application
oExcel.Visible = True
I've also tried using Excel.ApplicationClass instead, and I've tried using
the CreateObject function. Excel DOES become visible, but the exception is still thrown.
Any other suggestions would be appreciated. |
|