CurrentPageList

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I have a Page field and want to apply a filter to the field. For example if
the field has 3 values - A, B, and C. I want to set it to just display B.
How can I do this in VBA? I thought CurrentPageList was right but it doesn't
seem to work.

For this example say the page field is called Letters.

Thanks,
Joe
 
Hello Joe,

We can call Range.AutoFilter function to filter a range of values. Codes
look like

ActiveSheet.Range("$A$1:$A$24").AutoFilter Field:=1, Criteria1:="B"

http://msdn.microsoft.com/en-us/library/bb242013.aspx
If you want only show "B", we just need to set the Criteria1 parameter to
"B"


Best regards,
Ji Zhou
Microsoft Online Community Support
 
Back
Top