Have a strange problem when I try to create a Workbook in excel from VB.Net(it works in VB6). the error message i get when executing the line: oWorkbook = oExcel.Workbooks.Add("C:\Temp\Template.xls") is: "Old Format or invalid Type library. (32792)"
I have faild trying to find out what that means, since I am using COM in both VB6 and .NET it should not precent a problem but never the less it does.
Anyone have any ideas?
(Here is the test code I use):
Dim oExcel As Excel.Application
Dim oWorkbook As Excel.Workbook
Dim sTemplate As String
oExcel = New Excel.Application()
On Error GoTo ConvertToXL_Error
oWorkbook = oExcel.Workbooks.Add()
MsgBox("Error when converting to Excel." & vbCrLf & "(" & Err.Description & " (" & Err.Number & ") )")