title: Excel VBA columns function fails: Application-defined or object-defined error
body: <p>When using VBA code to automate functionality in Microsoft Excel, I've encountered an apparent "bug" using the columns function (see code sample). Does anybody have an explanation as to why my code is failing?</p>
  
  <pre><code>Private Sub Worksheet_Activate()
      Dim m_Range As Excel.Range
      Set m_Range = Me.Range("A1:I10")
  
      'Works as expected
      m_Range.Interior.Color = XlRgbColor.rgbCrimson
  
      'Works as expected
      m_Range.Columns(m_Range.Columns.Count + 1).Rows("1:3").Interior.Color = XlRgbColor.rgbRosyBrown
  
      Fails: Application-defined or object-defined error
      m_Range.Rows(m_Range.Rows.Count + 1).Columns("1:3").Interior.Color = XlRgbColor.rgbAquamarine     
  End Sub
  </code></pre>