title: Autofilter method of range class. Not the usual
body: <p>I have an error occurring, which seems to plague many different people in many different ways. In my case, my code works, but the runtime error popping up after each change is very annoying. </p>
  
  <p>My code is below:</p>
  
  <pre><code>Public Sub Filter_Sheets()
  
      Dim i As Long
      Dim comboBox As ControlFormat
  
      With ThisWorkbook
          Set comboBox = .Worksheets(9).Shapes("Drop Down 229").ControlFormat
          For i = 1 To Worksheets.Count
              .Worksheets(i).UsedRange.AutoFilter Field:=15, Criteria1:=comboBox.List(comboBox.ListIndex)
          Next
      End With 
  End Sub
  </code></pre>
  
  <p>The line that is failing is<code>.Worksheets(i).UsedRange.AutoFilter Field:=15, Criteria1:=comboBox.List(comboBox.ListIndex)</code></p>
  
  <p>I have tried a different things for Range and Worksheets, along with the line above the bugged code. I have tried putting quotes around the criteria, nothing has yet solved the bug. </p>
  
  <p>Anyone got any idea?</p>