I'm trying to add some filters to a pivot table and have the following error - Application-defined or object defined error;

My filter code is as follows;

       .PivotTables("PivotTable1").PivotFields("Stock Code").PivotFilters. _
      Add Type:=xlCaptionDoesNotEndWith, Value1:="IM*CM*MOECA*MORCA*POOL*-B*R"
       .PivotTables("PivotTable1").PivotFields("Sedol Code").PivotFilters. _
      Add Type:=xlCaptionDoesNotEqual, Value1:="9009218*9040550*9080440"
What is the issue?