vb .net and Excel 2000

S

Steven

Hello,

I use the following code to make an Excel-file, which works fine with
Excel 2003 (and the MS Excel 11.0 object library):


Dim Excel As New Excel.Application
Dim oBook As Excel.Workbook
Dim WSheet As New Excel.Worksheet
WSheet = Excel.Workbooks.Add.Worksheets.Add
Excel.Visible = True
etc ...

With Excel 2000 (and the MS Excel 9.0 obj lib), however, i get an error
on the line
-> Dim Excel As New Excel.Application

Error: Server execution failed

does anyone have an idea? I probably don't have the right references or
so. Has anyone experience with VB .NET and Excel _2000_ ?

Thanks,

Steven
 
G

Guest

Hi Steven

I have an app that uses Excel 2000. Here is an example of my code and refferences

Dim excelApp As New Excel.Application
Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = CType(excelBook.Worksheets(1), Excel.Worksheet)

I refference:
Excel.dll 9.0
Office.dll 9.0

Hope this helps.
BrianDH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top