very hard ,IMMEDIATE HELP... (for experienced guys)

geonaf

Banned
Joined
Jan 28, 2003
Messages
29
Please help me how I can run the excel evaluate command in vb net.I use office xp (ms excel 10.0 object library)
Code:
Public Class Form1
....
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim EXL As New Excel.Application()
 I want to evaluate Cos(20)
EXL.Evaluate("Cos(20)" )
End Sub
End Class

Always the following message appears:
An unhandled exception of type System.Runtime.InteropServices.COMException
occurred in WindowsApplication3.exe
Additional information: Old format or invalid type library.

How could I fix that?
TU
 
I just pasted your Form_load into a testing project Ive got and it worked fine when I put the results in a message box.
Code:
   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim EXL As New Excel.Application()
         I want to evaluate Cos(20)
        MsgBox(EXL.Evaluate("Cos(20)"))
    End Sub
The answer is: 0.408082061813392

Have you checked here?
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q320369
 
Maybe it didnt work on my system, because of office xp, its a bag, which I found on quwiltws microsoft page, thank u all very much!!!

PS:sorry for doubling
 
Back
Top