467,092 Members | 1,245 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,092 developers. It's quick & easy.

vb .net and Excel 2000

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
Nov 20 '05 #1
  • viewed: 1938
Share:
1 Reply
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
"Steven" wrote:
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

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dean Bortell | last post: by
reply views Thread by Dent | last post: by
17 posts views Thread by Mansi | last post: by
3 posts views Thread by Michael Kellogg | last post: by
1 post views Thread by Randall Arnold | last post: by
4 posts views Thread by =?Utf-8?B?THluZXJz?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.