title: Writing formula into Excel through Access VBA
body: <p>I want to insert in "A1" some text "ABC" and the following cell in "B1" an <code>if</code> statement. However I get only the first entry "ABC" inserted and then an error at <code>FormulaR1C2 "Object doesn't support this property or method"</code>. I'm not sure I'm using the <code>R1C2</code> correctly. I was assuming it stood for Row 1 Column 2, can someone help me out. </p>
  
  <pre><code>Dim Excel_App  As Object
  Dim strExcel As String
  Set Excel_App = CreateObject("Excel.Application")
  Excel_App.Visible = True
  Excel_App.Workbooks.Add
  With Excel_App
   .Range("A:B").EntireRow.ColumnWidth = 25
   .Range("A2").EntireRow.Font.FontStyle = "Bold"
   .ActiveCell.FormulaR1C1 = "ABC"
    strExcel = "=IF(A1 = """"," &amp; """EMPTY""" &amp; "," &amp; """FILLED""" &amp; ") "
   .ActiveCell.FormulaR1C2 = strExcel
  End With 
  </code></pre>