Does anyone know where examples can be found of creating pivot tables
in macros?

After some reading up on pivot tables, I went through the steps to create
one
that I needed and recorded the steps in a macro. But when I tried to run
the
macro, it failed on a line with the following in it:

....ActiveSheet.PivotTables("PivotTable13"). ...

Presumably, the problem is with the pivot table name. I'm looking for some
examples that show how to name a pivot table so I can have the same name
each time, as well as examples that show how to deal with other pitfalls.

Thanks.

- Bob