title: Error when I use SpecialCells of AutoFilter to get visible cells in VBA
body: <p>My main goal is to copy the visible cells of an autofilter and later copy the dimensions of the visible cells to the new sheet. I am using this code:</p>
  
  <pre><code>Sheets(1).AutoFilterMode = False
  Sheets(1).Range("A1:A1").AutoFilter Field:=columnaNumeroIntervalo, criteria1:=CDec(paramCantidadCriterio)
  Sheets(1).Range("A1:A1").AutoFilter Field:=columnaNumeroIntervaloUnidades, Criteria1:=paramUnidadesCriterio
  
  MsgBox AutoFilter.Range.SpecialCells(xlCellTypeVisible)(2, 11).Value
  </code></pre>
  
  <p>With the last line I want to check the value o a cell. If I use <code>Cells(2,11)</code> instead of <code>SpecialCells</code> I can see that cells have all the cells of the sheet, visible and not visible. So I want to use <code>SpecialCells</code>.</p>
  
  <p>If I use Special cells I get the following error:</p>
  
  <p><code>error '-2147417848 (80010108) in runtime. Automatization error.</code></p>
  
  <p>For the time an the type of the execution, it seem to enter in a loop, and finally gives this error. Perhaps SpecialCells modify the autofilter and then in each modification execute again the autofilter?</p>