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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multiple Open Excel Spreadsheets 12 41
Move data from one sheet to another 11 36
Clear Filter 8 40
Excel, covert column titles to row titles and back 2 13
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
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.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

803 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