title: Application defined or object defined error on code
body: <p>I get an error on this line in my code, any ideas what the issue may be?</p>
  
  <pre><code>Intersect(.UsedRange, .UsedRange.Offset(1)).SpecialCells(12).EntireRow.Delete
  </code></pre>
  
  <p>Here is the rest of the code:</p>
  
  <pre><code>Sub DefineDL_IDL()
  
  Dim wbTHMacro As Workbook, wsRegulares As Worksheet, wsRegularesDemitidos As Worksheet, wsTempActivos As Worksheet, _
  wsTempJA As Worksheet, wsTempFit As Worksheet, wsTempDemitidos As Worksheet, wsPS As Worksheet, wsResultados As Worksheet, _
  wsDLList As Worksheet, wssheet As Worksheet, count_DL As Integer, count_IDL As Integer
  Dim x&amp;, r As Long
  
  '*************REGULARES***********
  
      Sheets("Regulares").Select
  
  'Debug.Print xlToRight
  'Sheets("Raw").Copy before:=Sheets(2)
  With Sheets("Regulares")
      '.Name = "Final2"
      .UsedRange.AutoFilter 9, "INATIVE"
      Intersect(.UsedRange, .UsedRange.Offset(1)).SpecialCells(12).EntireRow.Delete
      r = WorksheetFunction.CountA(.Range("A:A"))
      .UsedRange.AutoFilter
      .Range("J:J").Insert xlToRight
      .Range("J1").Value = "Real MO"
      .Range("K:K").Cut
      .Range("I:I").Insert xlToRight
      .Range("Q:Q").Cut
      .Range("I:I").Insert xlToRight
      .Range("L2:L" &amp; r).FormulaR1C1 = "=VLOOKUP(RC[-3],'DL List'!C[-11]:C[-10],2,0)"
      .Range("L2:L" &amp; r).Value = .Range("L2:L" &amp; r).Value
      For x = 2 To r
          If Range("L" &amp; x).Text = "#N/A" Then
              'If Range("K" &amp; x).Value = "DL" Then
              '    Range("L" &amp; x).Value = "DL"
              'Else: Range("L" &amp; x).Value = "IDL": End If
              Range("L" &amp; x).Value = "IDL"
          End If
      Next x
  End With
  
      count_DL = Application.WorksheetFunction.CountIf(ActiveSheet.Range("L:L"), "DL")
      count_IDL = Application.WorksheetFunction.CountIf(ActiveSheet.Range("L:L"), "IDL")
  
      Worksheets("Resultados").Range("B17") = count_DL
      Worksheets("Resultados").Range("C17") = count_IDL
  </code></pre>