Macro is not Cooperating with Quotations in Excel VBA

Posted by B-Ballerl on Super User See other posts from Super User or by B-Ballerl
Published on 2011-02-26T20:39:19Z Indexed on 2012/06/28 9:18 UTC
Read the original article Hit count: 271

Filed under:
|
|
|

I Have a macro containing a line that will change the formula of a cell using R1C1 formula type.

The formula is:

    ActiveCell.FormulaR1C1 = _
    "=IF(R[0]C[-2]=0,"",(R[0]C[-20]-R[0]C[-16]))"

When ever I attempt to run the macro it always comes up with a dialog box saying

    Run-time error '1004':
    Application-defined or object-defined error.

And when you click debug it highlights those 2 lines in the macro. And I can't figure out how to fix it. Can anyone help?

© Super User or respective owner

Related posts about microsoft-excel

Related posts about excel-2010