Serving the Quantitative Finance Community

 
User avatar
luizvs
Topic Author
Posts: 0
Joined: May 23rd, 2003, 6:13 pm

OLE in Excel with c++

June 25th, 2004, 12:44 pm

I am trying to set a formula to a range using the IDISP_range.OlePropertySet (the same as Invoke with DISPATCH_PROPERTYPUT) but Excel crashes after the first use. In fact, Excel starts a kinf of endless looping and stop calculation at all.Here is some pieces of my code in C++ (Builder 6):*********************************************String formula;formula="=1";Variant range;//Some code to take rangel IDispatch...cell.OlePropertySet("Formula", formula.c_str()); //Works fine//Try again and crashescell.OlePropertySet("Formula", formula.c_str()); //Ole call never returns!! ************************************************I got the same when using GetDisp and Invoke functions.Any help?Tx in advance!
 
User avatar
luizvs
Topic Author
Posts: 0
Joined: May 23rd, 2003, 6:13 pm

OLE in Excel with c++

July 1st, 2004, 11:55 pm

OK...I got it...I was a thread issue!Tx all