Simple Excel 2010 issue
Posted on 2013-10-30
This seems simple enough... This following code is attached to a button to clear some data on a spreadsheet...
ActiveCell.FormulaR1C1 = "=DATE(YEAR(F3),MONTH(F3)+1,DAY(F3))-1"
The formula works fine but when it runs in code, Excel replaces the cell with this...
(Note the single quotes that are added)
If I edit the formula and remove the single quotes it works as expected but Excel is adding the single quotes when it inserts the formula.
How can I have Excel insert the code as I have written it??