Solved

VSTO 2008 ambiguous name

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

xlApp.ActiveWorkbook.Styles.Merge(Workbook:=xlApp.Workbooks(Globals.ThisWorkbook.Name))
0
Comment
Question by:murbro
  • 2
5 Comments
 
LVL 85

Expert Comment

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

Author Comment

by:murbro
ID: 22821810
Hi

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

Accepted Solution

by:
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
0
 

Author Closing Comment

by:murbro
ID: 31510250
Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

708 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

17 Experts available now in Live!

Get 1:1 Help Now