title: VBA to set pivot filter as single selection
body: <p>Resolved my original problem from earlier today - now I have working code that isn't producing quite as polished a result as I'd like.  In a nutshell, I'm looping through all sheets and setting all pivots to be filtered to a single value.  I don't want multiple values unless the filter is cleared and showing everything.  My code below shows the desired <em>data</em> but the filter on the pivot itself displays as Multiple Values (with the one value checked). How can I get it to treat this as a single selection, and show that single value on the pivot filter?</p>
  
  <pre><code>Sub Loop_Complex_bkup()
  Dim wks As Worksheet, strName As String, pvt As PivotTable, strPvtName As String
  
  For Each wks In Worksheets
  strName = wks.Name
  For Each pvt In wks.PivotTables
      strPvtName = pvt.Name
      With Sheets(strName).PivotTables(strPvtName).PivotFields("OrderSubType")
          .ClearAllFilters
          For Each PivotItem In .PivotItems
              If PivotItem = "Complex" Then PivotItem.Visible = True
              If PivotItem &lt;&gt; "Complex" Then PivotItem.Visible = False
          Next
      End With
  Next
  Next
  
  Set wks = Nothing
  Set pvt = Nothing
  
  End Sub
  </code></pre>