title: Excel VBA Macro: User Defined Type Not Defined
body: <p>I'm getting the above error when trying to execute this macros. I'm pretty new to Macros and coding in general so please forgive the ignorance.</p>
  
  <pre><code>Sub DeleteEmptyRows()
  
  Dim oTable As Table, oRow As Row, _
  TextInRow As Boolean, i As Long
  
  Application.ScreenUpdating = False
  
  For Each oTable In ActiveDocument.Tables
      For Each oRow In oTable.Rows
  
          TextInRow = False
  
          For i = 2 To oRow.Cells.Count
              If Len(oRow.Cells(i).Range.Text) &gt; 2 Then
                  'end of cell marker is actually 2 characters
                  TextInRow = True
                  Exit For
              End If
          Next
  
          If TextInRow = False Then
              oRow.Delete
          End If
      Next
  Next
  Application.ScreenUpdating = True
  
  End Sub
  </code></pre>