title: Excel VBA to run Macro in new row is Inserted
body: <p>I am trying to have my spreadsheet automatically take the previous rows format and formulas when a new row is inserted.  </p>
  
  <p>I read where you can set up your sheet to automatically run the code if a change is made, but I am having a hard time getting the code to work.</p>
  
  <p>I have tried the following and every time I insert a new row it keeps adding a row until it gets an error and I have to force quit:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
      If Target.Range("A1:D25") = ActiveCell.EntireRow.Insert Then
          Cells(1, 2).Value = 10
      End If 
  End Sub
  </code></pre>
  
  <p>I added the <code>Cell Value = 10</code> to see if it would work.  It was just a test, but it still fails.</p>
  
  <p>Does anyone know a possible solution?</p>