Copying Pivot Table

K

Ken McLennan

G'day there One & All,

It's me, back again. I posted earlier about trying to build a
report from the office's workbooks ("Thankyou" again to those
who responded). These workbooks contain several sheets, each with a
pivot table drawing information from a database cube.

I've now copied 3 of these sheets to my own workbook so I have 3
pivot tables. I've written code to ask if the 3rd sheet is needed when
the file is opened (it calculates yearly averages and will probably only
be used once a year) so there are 2 pivot tables that try to update
immediately.

On loading my file, I get an "Object or Application" error which
doesn't tell me a great deal. However since the code stops on
"pt.PivotCache.MakeConnection" I'm guessing that there's an issue with
the connection to the data source.

I have no problem connecting to the source from the original
sheets on the same machine, so the problem's not related to permissions
or paths.

Do I need to copy some other settings across to my workbook? I've
not been able to find anything like that on Google, or in John
Walkenbach's books and I don't know what I'm looking for anyway.

This is the first pivot table I've tried to write code for, and
the first I've dealt with that has an external data source. Any advice
or pointers will be gratefully accepted.

Thanks for listening,
Ken McLennan
Qld, Australia
 

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