2 sheets are pivot tables and 2 sheets contain pivot charts. The other sheets that work fine are of the same format.
2 sheets are pivot tables and 2 sheets contain pivot charts. The other sheets that work fine are of the same format.
So... did you test the suggested code ?
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Can you post a sample workbook? Make sure you remove any sensitive data from it.
Click GO ADVANCED and use the paperclip icon to post up your workbook.
Regards,
Karan
Karan, I would pretty much stake my life on the fact that changing sh variable from worksheet to Object will resolve the issue.
Neither the Pivot Table nor the Pivot Chart "sheets" will appear within the Worksheets Collection, the former by virtue of being linked to the Chart Object
If you wish to test, were the PT Chart removed leaving only the PT the existing code would work without issue given all "sheets" would then be "worksheets".
(if the PT Chart were embedded as an object within the PT sheet I suspect it would work also)
In these scenarios the basic options are to:
a) iterate Worskheets then ChartObjects
or
b) iterate by Object
Thanks for the information DonkeyOte. But, was that message for me?
Regards,
Karan
Yep... ie I'm not really sure we need a sample file - I would like OP to test suggestion first off - as yet no response to that.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks