title: Excel VBA Only Executes Highlight Cell in Break Mode
body: <p>I wrote a macro for ExcelVBA that is extremely simple. It essentially copies the entire section of the sheet over, and then adds 4 to the cell selected by the user.</p>
  
  <p>My challenge is with the end - I want to highlight the cell I added 4 to. 
  I select the cell and paste in the value:</p>
  
  <pre><code>With Progression.Cells(CatSearch, CurrentColumn)
      .Value = LF
      .Interior.ColorIndex = 37
  End With
  </code></pre>
  
  <p>Problem is that it changes the value of the cell, but not the color.</p>
  
  <p>Interesting point is that it works in break mode, but not when I run the entire macro. </p>
  
  <pre><code>Public Sub BuildFootageProgression()
  
  Dim Category As Byte
  Dim Working As Workbook
  Dim Progression As Worksheet
  
  Set Working = ActiveWorkbook
  Set Progression = Working.Sheets(1)
  
  
  Category = InputBox("Enter Category Number of Category to Gain Next Four Feet", "Category Decision Box")
  ''Asks which category should gain the next four feet in a popup box
  
  
  Dim CatSearch As Integer
  Dim InputResult As String
  CatSearch = 1
  
  
  'Start by verifying that the input category is in the list, and identifies the row # of that category and saves to variable "Cat Search"
  
  Do Until Sheet1.Cells(CatSearch, 1).Value = Category
      CatSearch = CatSearch + 1
  
      If CatSearch &gt; 10000 Then
          InputResult = InputBox("The previously entered category number could not be found. Enter Category Number of Category to Gain Next Four Feet.", "Category Decision Box")
  
          If InputResult = vbNullString Then
              Exit Sub
          Else
              Category = InputResult
              CatSearch = 1
          End If
      End If
  Loop
  
  
  'This section is to find the first blank column and identify the 12 columns we will be working with
  If Sheet1.Cells(CatSearch, 1).Value = Category Then
  
      Dim CurrentColumn As Integer
          CurrentColumn = 1
  
      Do Until IsEmpty(Cells(1, CurrentColumn))
      CurrentColumn = CurrentColumn + 1
      Loop
  
  
  End If
  
  'Function to copy formula from previous section to current section
  Dim previous As Range
  Set previous = Range(Sheet1.Cells(1, CurrentColumn - 11), Sheet1.Cells(100, CurrentColumn - 1))
  previous.Copy (Sheet1.Cells(1, CurrentColumn))
  
  Dim Current As Range
  Set Current = Range(Sheet1.Cells(1, CurrentColumn + 1), Sheet1.Cells(100, CurrentColumn + 10))
  Current.Columns.AutoFit
  
  'Unhighlights all of the cells
  For Each c In Current.Cells
      c.Interior.ColorIndex = 2
  Next
  
  'Adds four feet to chosen category
  Dim LF As Integer
  LF = Sheet1.Cells(CatSearch, CurrentColumn).Value
  LF = LF + 4
  
  With Progression.Cells(CatSearch, CurrentColumn)
      .Value = LF
      .Interior.ColorIndex = 37
  End With
  
  
  'Takes Null Values and Makes the Cells Blank
  Cells.Replace "#N/A", "", xlWhole
  
  End Sub
  </code></pre>