Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Formula in OLE2 Objects

0 Likes
648

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.

3 REPLIES 3
Read only

Former Member
0 Likes
528

you use ole already. why don't you calculate in code and write to excel manually?

Read only

0 Likes
528

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!

Read only

Former Member
0 Likes
528

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