title: Excel VBA Macro - Copy method of range class failed & Insert method of range class failed
body: <p>I've written a macro to copy and insert rows or columns in different locations depending on an input string. The copy and insert locations are defined by Named Ranges within the spreadsheet. </p>
  
  <p>If I want to add several columns in the same section, everything works great. If I add even one column in one section, then want to add a column in another section, I get one of two errors: <em>Copy method of Range class failed</em> OR <em>Insert method of Range class failed</em></p>
  
  <p>I haven't been able to figure out why sometimes the copy method throws an error and sometimes it doesn't. Any help would be greatly appreciated.</p>
  
  <p>Code:</p>
  
  <pre><code>    Sheets("TL Master").Range("Insert" &amp; strAddType).Copy
  
          'Offset for row/column
          If strRowColumn = "row" Then
              'Row = add value above
              Range("Insert" &amp; strAddType).Insert Shift:=xlDown
              Range("Add" &amp; strAddType &amp; "ButtonCell").Offset(-4, 0).Value = strNewName
          Else
              'Column = add value left
              Sheets("TL Master").Range("Insert" &amp; strAddType).Insert Shift:=xlToRight
              Range("Add" &amp; strAddType &amp; "ButtonCell").Offset(0, -4).Value = strNewName
              If strAddType = "Machine" Then Range("Add" &amp; strAddType &amp; "ButtonCell").Offset(0, -4).Interior.Color = clrComplexityColor
  
          End If
  </code></pre>