By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

vb .net and Excel 2000

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.