How do you programmatically select a value for a pagefield in a pivottable?

I tried the following where "projCode" contains the value I want selected from the list of valid values for the pagefield:

<span style="background-color: #FFFF00; color: #000000; font-weight: bold">ActiveSheet.PivotTables("Mthly Proj Summary PivotTable").PivotFields ("Project").CurrentPage = projCode</span hi>

However, an invalid project code value overlays the previously selected pagefield value, removing the original from the listbox! I'm looking for an approach that will either error in this situation or, at a minimum, take no action.