title: Error when setting VBA pivotfields.currentpage
body: <p>I am trying to make a macro that will automaticly adjust the filters for several pivot tables based on user input, however if the user puts in something that isn't avaialble the code produces an error when trying to apply the filter.</p>
  
  <p>Is there anyway to check which filters are available to select?</p>
  
  <p>Example: One pivot table has three filters available (Year, Month, Type [Complaint, Praise, Both]) but if during a month there weren't any complaints then there is an error.</p>
  
  <p>Code:</p>
  
  <pre><code>With PTable
      .PivotFields("Year").CurrentPage = Y
      .PivotFields("Month").CurrentPage = M
      .PivotFields("Type").CurrentPage = T 'Error line if T isn't valid
  End With
  </code></pre>