Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Of course, you can also create a PivotTable (DataPilotTable) by user code, but I would assume it useless to map all the settings you can make in the big PivotTable dialogue to parameters. Anyway it's always a special task to pass parameters to a Sub. I also would not try to mimic the functionality of a PivotTable by user code. The very next day expectations may change a bit, and the code will need its own refresh.

As I saw the OP the accent was on frequent or even automatic refresh.
How I would do it is demonstrated in this attachment.