Hello,
I have recorded a macro that will create a pivot table however it always fails when I try to use it. I get the following error
Run Time Error '1004'
Unable to get the Pivotfields properties of the PivotTable Class
Background
The excel spreadsheet is created from a php script that runs a sql query and dumps the query data into excel so that user can can download the excel file.
Once the excel has been downloaded by the user, they can open it and click/hit CTRL+W to create a new worksheet ( This part works )
Here is the code for the new worksheet macro
Here is a code for the Pivot Tabel macro
Other things to note .....
The sql query results will vary from month to month ......meaning some months will have more rows of data then others.
I'm new to macros and any assistance is appreciated .....
Thank you in advance
Arvin
Bookmarks