Trouble with app.selection.formulaarray

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

Trouble with app.selection.formulaarray
delphi windows 7 excel 
Larry X


Serious Developer


Posts: 34
Joined: 2011-04-22
Hi Dmitry,

I am revisiting a topic you helped me with in April. Your suggestion below worked great with Delphi 7, Excel 2003, and Windows XP Pro. But now, when I try it with Delphi 7, Excel 2003, and Windows 7 pro, it fails. I get the error message saying that it cannot set the formulaarray property, and then excel is unresponsive and has to be Task Manager killed. It seems that one of the problems is that the try..except in Delphi does not catch the exception. Any suggestions would be much appreciated. Thanks.

Please try to test the following code:
try
App.Selection.FormulaArray := '='+Formula;
except
App.Selection.FormulaArray := '='+Formula;
end;
Posted 22 Sep, 2011 22:18:51 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Larry,

Sorry but I don't know the exact cause of this issue. Do you have the same Excel versions on both PCs? I mean localization and service packs. Which exactly error do you get? How many characters does your formula contain?
Posted 23 Sep, 2011 06:41:58 Top
Larry X


Serious Developer


Posts: 34
Joined: 2011-04-22
Thanks Dmitry! Once I updated Excel 2003 with SP3, all worked OK. Excellent.
Posted 23 Sep, 2011 08:05:04 Top