I sent data to Excel from a VB6 application through ADO.

I recorded a macro to create a pivot table from this data, and copied the macro into the VB application, but am gettting the error:

"Unable to get the pivotfields property of the pivottable class"

Any ideas gratefully received.