title: VBA - test if a value is a valid selection for a PivotField
body: <p>For a pivot table (pt1) on Sheet1, I use VBA to change the value of a filter field (filterfield) using the code below. Let's say values for field can be A, B or C</p>
  
  <pre><code>Sheets("Sheet1").PivotTables("pt1").PivotFields("filterfield").CurrentPage = "A"
  </code></pre>
  
  <p>Occasionally, and let's say randomonly for the purposes of this question, A, B or C will not be a valid selection for filterfield. When VBA attempts to change the field, it throws a run-time error. I want to avoid this.</p>
  
  <p>How can I check if my values are valid for filterfield before I run the code above? I would like to avoid using On Error and VBA does not have try/catch functionality..</p>