I am using exceldna to build an excel addin. I have created a class library project in visual studio 2008. I compile it into a dll file. I use an xll file to add the addin into excel. The xll file calls the dna file and then it calls the dll file to execute
the program. Now I want to add a ribbon to excel. I just know that I can create an addin project in visual studio 2008 to create a com addin, but when I want to get the excel object from the com addin, i.e.
Microsoft.Office.Interop.Excel oExcel = (Microsoft.Office.Interop.Excel.Application)ExcelDnaUtil.Application;
It returns this error "Exception of type 'ExcelDna.Integration.XlCallException' was thrown"
Can you tell me how can I get the excel object after I click a button in the ribbon I have created. Thanks.