Using ExcelApp Variable...

Add-in Express™ Support Service
That's what is more important than anything else

Using ExcelApp Variable...
 
George Spears




Posts: 79
Joined: 2010-05-06
Hello,
Delphi XE6...Excel 2010/2013
I have a Ribbon Bar, with a button, which creates then opens a form...
The form needs to access the ExcelApp variable... for example...

In the *_IMPL.pas file... This code works fine...


 IF Not ExcelApp.ActiveWindow.Application.ActiveWorkbook.Saved[LOCALE_USER_DEFAULT] then
  ShowMessage('Not Saved');


If I mouse over "ExcelApp", it shows that this variable is defined in Excel2000. If I go to my form, and include Excel2000 in my USES clause, the above code still gives me an error stating "ExcelApp: Undeclared Identifier". What else do I have to include in my USES clause to allow my various forms to access the ExcelApp variable?

Thanks
George
Posted 06 Oct, 2014 07:40:38 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello George,

You can change the constructor of the form and initialize the form in your code by passing ExcelApp to the constructor.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Oct, 2014 07:53:41 Top
George Spears




Posts: 79
Joined: 2010-05-06
OK, thanks...
Posted 06 Oct, 2014 07:57:09 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Welcome.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Oct, 2014 08:09:49 Top