?
Solved

What does this error message mean?   Application is ambiguous in the namespace microsoft.office.interop.excel

Posted on 2008-06-16
4
Medium Priority
?
2,349 Views
Last Modified: 2010-04-21
I was working on my project, inserted an excel snippet by mistake and after I removed the snippet my program has errors all over where I reference Microsoft.Office.Interop.Excel

I get this error code:  Application is ambiguous in the namespace microsoft.office.interop.excel

What does it mean?  How can I make my program work again?
0
Comment
Question by:logoncom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:Wakeup
Wakeup earned 800 total points
ID: 21798054
This seems similar to your problem.  I'm no VB guru at all, just thought this may be applicable...If it's not sorry! :)

http://msdn.microsoft.com/en-us/library/aa164018(office.10).aspx
0
 
LVL 24

Accepted Solution

by:
purplepomegranite earned 1200 total points
ID: 21798179
Yes, that article does explain the problem.  You are declaring object as application, but not being more specific.  You now have more than one object to which application applies, so Visual Studio cannot determine which you are referring to.

You need to go through and identify all your application declarations e.g.

dim x as application

Change these to the specific application you are declaring e.g.
Dim x as Microsoft.Office.Interop.Excel.Application

Or, if you are not using any Excel code anymore, you could go through and delete any Microsoft Office imports, e.g.
Imports Microsoft.Office.Interop.Excel
0
 

Author Closing Comment

by:logoncom
ID: 31467794
you answer did not directly help answer my problem but it did make me realize what I did.  By adding the excel snippet I did not want to add... it added a reference to excel that did not belong in my project... as soon as I removed the reference, all was good again.  Thanks.
0
 
LVL 18

Expert Comment

by:Wakeup
ID: 21798948
Hey thanks for the points!  I appreciate it! :)  Glad you were able to fix the problem!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question