title: How to copy a specific amount of rows from one ss to another
body: <p>I have 2 main ss <code>accNo</code> and <code>output</code>. 
  I'm trying to copy <code>x</code> amount of rows from <code>AccNo</code> to output. 
  The <code>x</code> is a variable and is determined by the user, it's inputted into cell <code>B5</code> from a different ss called 'input'.
  Is there a way for me to loop my code which will copy row <code>A1, A2, A3, A4</code> etc from <code>AccNo</code> to output, (starting from <code>A4</code> in output)?</p>
  
  <p>I'm trying this as a macro with buttons and I'm able to do one at a time, it's just the loop I'm struggling with. I need it to loop <code>x</code> amount of times so for example. if <code>x = 5</code> I want it to copy over 5 rows of data from <code>accNo</code> to output.</p>
  
  <pre><code>Sub TradingAccount()
  
      Set accNo = ThisWorkbook.Worksheets("AccountNo")
      Set output = ThisWorkbook.Worksheets("Format")
      Set input = ThisWorkbook.Worksheets("input")
  
      i = 1
      e = 4
  
      Do loop x amount of times = True
          accNo.Range("A" &amp; i).EntireRow.Copy
          output.Cells(e, 1).PasteSpecial xlPasteValues '(e,1) is A4?
          ActiveCell.Offset(1, 0).Select
          i = i + 1
          e = e + 1
      Loop
  
  End Sub
  </code></pre>
  
  <p>the macro will copy over <code>x</code> amount of rows from one spreadsheet to another.</p>