SOLVED - Formula assignment problem
Problem solved..
Since the formula is stored in a database field, it doesn't require the
double double quotes to indicate a double quote character.
Hello !
I'm generating a spreadsheet from Access. (all in 2002)
At one point, I have the following formula to put into a cell :
xlSheet.Range(...).FormulaR1C1 = _
"IF(ISBLANK(RC[-1]),"""",IF(LEFT(RC[-1],1)=""N"",""Fail"",""Passed""))"
If I do the assignment directly in code as above, it works well. But if I
use instead :
xlSheet.Range(...).FormulaR1C1 = strFormula
where strFormula contains exactly the same formula (except for the leading
and trailing quotes), it fails with an error 1004
Any idea ?
Thanks in advance.
|