Is the a sample VBA to dynamically change PivotChart Y axis Range

jscriptor09

New member
Local time
Yesterday, 22:16
Joined
Apr 13, 2011
Messages
2
Hi folks

Right now, I have a query set up to write to a table, and a Pivot chart that plots the data off the table. The data range in the table changes depending on dept/functions and so forth.

I need the ability to rescale the pivot chart Primary Y axis on the fly using vba. The line of thought is that I can determine the range from looking at the table before calling the Form that has the PIVOT chart.

Question:
Given that I have a pivot chart Form in place, how do I point to it using VBA and what would be the logic to change the scale. Please note that I have several forms with PIVOT charts. I need to be able to select specific one out of the collection.

The part that I don't understand is the Pivotchart chart object model. Basically, if I select and event (say onLoad) and type Me. the intellisense provides no clue about anything that has to do with pivotvhat. Me.Picture does not seem to help either.

Many thanks for you help
 

Users who are viewing this thread

Back
Top Bottom