Solved

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

Posted on 2008-06-16
4
2,340 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
  • 2
4 Comments
 
LVL 17

Assisted Solution

by:Wakeup
Wakeup earned 200 total points
Comment Utility
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 300 total points
Comment Utility
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
Comment Utility
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 17

Expert Comment

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now