Excel reference

  • Thread starter Thread starter Looch
  • Start date Start date
L

Looch

Thanks in advance for any help. I'm having trouble with this code:

Dim xlsApp As Excel.Application
Dim xlsWB As Excel.Workbook
xlsApp = New Excel.Application
xlsApp.Visible = True

......

The problem is Excel.Application is not recognized. I have the Excell
11.0 object reference as well as the Office 11.0 reference (I can't
import Microsoft.Office.Interop.Excel either). Not sure what is going
on.

Any suggestions? I'm using VB 2005 Express.
 
Looch,

I think what you are looking for is the Visual Studio Tools for Office. The
Express Editions do not support Office development.

You would need either the Visual Studio Tools for Office, or one of the
Visual Studio Team Editions.

http://msdn2.microsoft.com/en-us/vstudio/aa700921.aspx

Hope this helps,

Steve






I think what you are looking for is the Visual Studio Tools for Office. The
Express Editions do not support Office development.

AFAIK, the Express editions work fine for Office development. The
following works fine after importing the COM reference to Microsoft
Excel 11.0 Object Library (no Import statements needed)

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim excel As New Excel.Application()
excel.Workbooks.Add()
excel.Visible = True
End Sub

End Class

Thanks,

Seth Rowe
 
AFAIK, the Express editions work fine for Office development. The
following works fine after importing the COM reference to Microsoft
Excel 11.0 Object Library (no Import statements needed)

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim excel As New Excel.Application()
excel.Workbooks.Add()
excel.Visible = True
End Sub

End Class

Thanks,

Seth Rowe- Hide quoted text -

- Show quoted text -

Thanks for the replies. I had to remove and then re-add the Excel
reference, not sure why, but it worked. Thanks again.
 
Thanks for the replies. I had to remove and then re-add the Excel
reference, not sure why, but it worked. Thanks again.

Thanks for the replies. I had to remove and then re-add the Excel
reference, not sure why, but it worked. Thanks again.

If that's the worst thing Visual Studio ever does to you, you should
be happy :-)

Thanks,

Seth Rowe
 
Back
Top