title: selecting an entire row based on a variable excel vba
body: <p>I am trying to select an entire row in a different sheet and then copy the row to the sheet I am currently in with a macro. The code works fine if the Rows() sub is passed integers hardcoded but when I put a variable I get the "Select method of Range class failed" error. here is the code I have:</p>
  
  <pre><code>Sheets("BOM").Select
  Rows(copyFromRow &amp; ":" &amp; copyFromRow).Select
  Selection.Copy
  Sheets("Proposal").Select
  Rows(copyToRow &amp; ":" &amp; copyToRow).Select
  ActiveSheet.Paste
  copyToRow = copyToRow + 1
  Rows(copyToRow &amp; ":" &amp; copyToRow).Select
  Application.CutCopyMode = False
  Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
  </code></pre>
  
  <p>if instead i used :</p>
  
  <pre><code>Rows("52:52").Select
  Selection.Copy
  </code></pre>
  
  <p>it works fine, but when the variable is there, the error occurs.</p>
  
  <p>Thanks</p>