title: Excel freezes during execution of vba
body: <p>This find and highlight vba is run when I click the button on a user form, even though it highlights the first instance, excel freezes and does not respond for a long time. Does not show any bug or such.</p>
  
  <pre><code>     Private Sub changebutton_tp_Click()
       Dim sheet As Worksheet
       Dim table_list_obj As ListObject
       Dim table_obj_row As ListRow
       Set sheet = Sheets("TermGUI")
  
  
      Dim rng As Range
  
  
      Set rng = sheet.Cells.Find(What:=TermPage.wordfound_tp.Value,_
  LookIn:xlValues, lookat:=xlWhole)
  
      If rng Is Nothing Then
          MsgBox ("Term Not Found")
      ElseIf IsEmpty(rng) Then
          MsgBox ("Term Not Found")
      ElseIf rng = "" Then
          MsgBox ("Term Not Found")
      Else
          With sheet.UsedRange
          If Not rng Is Nothing Then
              Do Until rng Is Nothing
                  sheet.Cells.Find(What:=TermPage.wordfound_tp.Value,_
                 LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False).Activate
                  With Selection.Interior
                      .ColorIndex = 6
                      .Pattern = xlSolid
                      .PatternColorIndex = xlAutomatic
                  End With
              Loop
          End If
          End With
          Set rng = Nothing
          MsgBox ("Term Found and Highlighted")
      End If
  
  End Sub
  </code></pre>
  
  <p>OK, I have identified the infinite loop, however what I want to do is to find all the terms that match the inquiry and highlight them. Without the loop it just does for one instance.</p>