MarkScripter
Programmer
I'm new to C# programming and am trying to write a simple application automating Excel 2003.
I have created a new Windows Application project named "WindowsApplication1" and used the default form name "Form1" and added a single command button to the form with no code. At this point (no code added) I can build it and display the form; however, as soon as I add a reference to Excel I get an "Ambiguous reference" error when I attempt to build.
The reference error is on the following line in the main routine below where it reads
'Application.Run(new Form1());:
static void Main()
{
Application.Run(new Form1());
}
I am assuming that the ambiguity occurs becuase the compiler does not know which application I am referring to (Excel or WindowsApplication1) but how do I correct the line to compile properly.
Thanks.
--Mark
I have created a new Windows Application project named "WindowsApplication1" and used the default form name "Form1" and added a single command button to the form with no code. At this point (no code added) I can build it and display the form; however, as soon as I add a reference to Excel I get an "Ambiguous reference" error when I attempt to build.
The reference error is on the following line in the main routine below where it reads
'Application.Run(new Form1());:
static void Main()
{
Application.Run(new Form1());
}
I am assuming that the ambiguity occurs becuase the compiler does not know which application I am referring to (Excel or WindowsApplication1) but how do I correct the line to compile properly.
Thanks.
--Mark