title: Change color of entire row before or after inserting values on a sheet VBA
body: <p>I'm Trying to change the value of a row when a determine condition happens, and I was thinking of doing it after the insert was made, but maybe it's easier before the insert (?) The thing is i've tried both, and i'm doing it wrong because it's not working </p>
  
  <p>Code:</p>
  
  <pre><code>With ThisWorkbook.Worksheets("Site Configuration List")
         ' Tried this .Range("A").EntireRow.Interior.Color = 49407
          .Range("A" &amp; Rows.Count).End(xlUp).Offset(1).Value = Code
          .Range("B" &amp; Rows.Count).End(xlUp).Offset(1).Value = Name
          .Range("C" &amp; Rows.Count).End(xlUp).Offset(1).Value = "" &amp; Contract &amp; ""
          .Range("D" &amp; Rows.Count).End(xlUp).Offset(1).Value = SiteCode
          .Range("E" &amp; Rows.Count).End(xlUp).Offset(1).Value = SiteName
          .Range("G" &amp; Rows.Count).End(xlUp).Offset(1).Value = Approver
          .Range("K" &amp; Rows.Count).End(xlUp).Offset(1).Value = ItemCode
          .Range("M" &amp; Rows.Count).End(xlUp).Offset(1).Value = RequiredQty
          .Range("N" &amp; Rows.Count).End(xlUp).Offset(1).Value = ControlFlag
      If Color = 0 Then
         ', this .Offset(-1).Interior.Color = 49407
          ',this .Interior.Color = 49407
       'and this .EntireRow.Interior.Color = 255
      Else
  
  
      End If
      End With
  </code></pre>
  
  <p>Obviously not at the same time, but no of those work. What am I doing wrong and how can I fix it? I'm new to VBA and some of the simplest things usually take me more time to figure out. What I've used in order to try to achieve what I want I've taken it from other similar questions. The call to the sub where the code above is implemented, is inside a loop, however, with each one of the things I've tried, when it gets to the line the program just stops. No error or anything.</p>