469,268 Members | 920 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

cannot find Microsoft.office.Interop

hi,

Two questions, i dont know if the cause if these two problems is the same.
1.
As soon as i Add->Reference -> Microsoft Excel 11.0 Object library. It
gives an error
'The referenced component 'Excel' could not found.

I downloaded PIA from MS website this morning.After a bit of digging i found
in the /assembly folder that Microoft/office/interop/excel.dll is present
but the version is 10.0.4504. I am wondering whether it makes a difference
and causes the error ? Do i need to get the latest PIA (version 11) to
colate with MS Excel 11.0?

2.

When i try to import Interop namespace, the intelisense does not show it
after Microsoft.office, instead it shows 'core'. How do i get Interop

Everything was working fine before i installed Office 2003 this morning and
started referncing it.

Anyhelp is appreciated.
Irfan

Nov 21 '05 #1
4 32614
Download the PIAs from here:

Page:
-----

http://www.microsoft.com/downloads/d...displaylang=en

Direct Link:
------------

http://download.microsoft.com/downlo...235/oxppia.exe

From what I remember, you extract them to a folder of your choice & then run
the batch file to register them

In your project, click 'add reference', click browse & find the
'Microsoft.Office.Interop.Excel.dll' file, click 'open' & then click 'ok'.
You will now see the Excel object listed under refences.

Switch to the code view of the form & type:

Imports Excel = Microsoft.Office.Interop

That will give you exactly what you wanted.

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2
Crouchie,

Browsing to the microsoft.office.interop worked perfect. Thanks.
However, when i use this method i am not able to specify which Excel Object
library i am referncing ie; 10.0 or 11.0.

Secondly,
I want to use 11.0 , but when i referance it, the IDE again warns me that
'referance component 'excel' cannot be found'. which is not the case when i
referance 10.0
Any suggestions, as to why i get a warning when i refer to Excel 11.0 object
library will be highly appreciated.

Irfan
"Crouchie1998" <cr**********@spamcop.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Download the PIAs from here:

Page:
-----

http://www.microsoft.com/downloads/d...displaylang=en

Direct Link:
------------

http://download.microsoft.com/downlo...235/oxppia.exe

From what I remember, you extract them to a folder of your choice & then
run
the batch file to register them

In your project, click 'add reference', click browse & find the
'Microsoft.Office.Interop.Excel.dll' file, click 'open' & then click 'ok'.
You will now see the Excel object listed under refences.

Switch to the code view of the form & type:

Imports Excel = Microsoft.Office.Interop

That will give you exactly what you wanted.

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE

Nov 21 '05 #3
Now, take a look at this article:

http://support.microsoft.com/default...b;en-us;822750

Example:

Private WithEvents xlApp As Excel.Application
Private xlBook As Excel.Workbook

In a sub()

xlApp = CreateObject("Excel.Application")
xlBook = xlApp.Workbooks.Add()
....
End sub

or see this page:

http://support.microsoft.com/kb/301982/

You'll get the idea

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #4
many thanks, Crouchie
"Crouchie1998" <cr**********@spamcop.net> wrote in message
news:eM**************@TK2MSFTNGP15.phx.gbl...
Now, take a look at this article:

http://support.microsoft.com/default...b;en-us;822750

Example:

Private WithEvents xlApp As Excel.Application
Private xlBook As Excel.Workbook

In a sub()

xlApp = CreateObject("Excel.Application")
xlBook = xlApp.Workbooks.Add()
...
End sub

or see this page:

http://support.microsoft.com/kb/301982/

You'll get the idea

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by garyinmiami2003 | last post: by
5 posts views Thread by C# newbie with big problems | last post: by
1 post views Thread by Alan T | last post: by
reply views Thread by frederick.the.fool | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.