2011 Sep 26 9:31 AM
Hi experts,
I want to know how I can define a formula in ole2 objects.
I had done the next steps:
1º) I define the next formula A1-SUMA(B1:E1)
2º) Add the formula to the object, in this case I used two options
a) SET PROPERTY OF g_cell 'Formula' = form.
b) SET PROPERTY OF g_cell 'Value' = form.
But, in both cases, when I open the excel document this formula give me an error #¿NAME?.
What is the problem?
Thanks in advance.
2011 Sep 26 9:50 AM
you use ole already. why don't you calculate in code and write to excel manually?
2011 Sep 26 10:09 AM
Thanks Tolga, but I have to use OLE because the excel could be modify by the users and it has to recalculate the result.
I resolved my proble, I use the key word SUM instead of SUMA.
Thanks anyway!
2011 Sep 26 10:15 AM
Hi,
Use the property FORMULA only, and add an '=' sign in front of the formula.
added: didn't see you've solved it
Kr,
m.
Edited by: Manu D'Haeyer on Sep 26, 2011 11:15 AM