do macros not like pivot tables?

G

Guest

Hello:

I am dumping data from an accounting application to a saved Excel
spreadsheet that contains a macro. The macro creates a pivot table out of
the data that is dumped to Excel.

I have been getting all kinds of errors, and I do not know how to eliminate
them!

One error that I got upon exporting the data to the spreadsheet containing
the macro was "cannot change this part of the pivot table report". When I
open the spreadsheet, data is "everywhere" and in a jumble.

I simply want the data dumped to Excel to be "reconfigured"/"redisplayed" as
a pivot table, and I need the macro to accomplish this.

Can macros not create pivot tables? I know that you can record a macro to
create a pivot table, because I have done that. But, do macros not like
being replayed if they have to create a pivot table?

It's all hard to explain. I wish I could.

The first time I had issues was when I simply recorded, at the beginning of
the macro, to remove columns from the spreadsheet that are not needed in the
pivot table. This was done to eliminate the first error I got that said that
"the pivot table field name in invalid". At first, I thought that this error
was caused from renaming columns as part of the macro. So, I stopped having
the macro rename columns.

But, no matter what I tried, I ended up ultimately with the error that I
mentioned at the beginnong of this case.

Help!

Thanks!

childofthe1980s
 
N

NickHK

There was a major change in how Pivot tables are dealt with between the
XL2002 and 2003 version (correct ?), so you should check which version(s)
you intend to support.
VBA can work with them, but you of course to use the correct code and there
are limitations with Pivot tables.

Debra Dalgleish has done a lot in this area. Check out the "P"s in:
http://www.contextures.com/tiptech.html

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top