code smaple from APIguide fails. - (getsheetobjects method code)
I discovered that the posted code is in the API guide for the CellVariations method. It may be in the API guide, but its broken in several ways.
First off - the member name is ExpressionVisual (no 's').
Second - ExpressionVisual is not a member of the properties object returned by GetProperties. The API guide does not document which objects have ExpressionVisual as a member, but the code sample has (adapted to your code):
set y = Pivot.GetProperties
set e = y.Expressions.Item(0).Item(0).Data.ExpressionVisual
Third - ExpressionVisual does not have a Count member. It does have an AttributeExpressions memer which is an array of attribute expressions.
CellVariations and ExpressionVisual are not fully documented in the API guide, so getting them to work will take some experimenting.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein