VSTO 2008 ambiguous name

Posted on 2008-10-27
Last Modified: 2013-11-10
I am getting an error on the following line of code "Globals is ambiguous, imported from the namespaces or types AOG2.Microsoft.Visual Basic.

Question by:murbro
  • 2
LVL 85

Expert Comment

by:Rory Archibald
ID: 22821639
What kind of project is this and what references do you have set?

Author Comment

ID: 22821810

Its a managed spreadsheet project. I had moved it from a computer with VS 2008 and Office 2003 to a machine with Office 2007
LVL 38

Accepted Solution

PaulHews earned 500 total points
ID: 22821854
The message means that the keyword "Globals" could refer to more than one class or namespace.  It sounds like you have an Imports statement for the Microsoft.VisualBasic namespace.  If you remove that Imports statement, it should fix your Globals reference.  If you are using functions from the MS.VisualBasic namespace, you would have to fully qualify them in your code.

Example, instead of calling "Instr" you would have to call Microsoft.VisualBasic.Instr

Author Closing Comment

ID: 31510250

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

930 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

19 Experts available now in Live!

Get 1:1 Help Now