Is There A Way To Move An Excel Pivot Chart

Tidy

Registered User.
Local time
Today, 06:23
Joined
May 9, 2011
Messages
16
Good Morning,
I have a quick question. Is there anyway to move an "Excel Pivot Chart" (The actual chart) around using VBA in access. I'm trying to mount the chart on a certain position of my spreadsheet but with no luck. I can't find any code that will set the charts location. If anyone knows if this is possible or not please let me know.
 
SMH, are my questions always unanswerable LOL.
 
I found the answer after hours of searching the web and playing with the code. If anyone else has run into this problem here is the answer.

Code:
    'Set PIVOT CHART Location by Height/Width and Left/Top
    objxlBook.ActiveSheet.ChartObjects("Chart 1").Left = Cells(11, 2).Left
    objxlBook.ActiveSheet.ChartObjects("Chart 1").Top = Cells(11, 2).Top
    objxlBook.ActiveSheet.ChartObjects("Chart 1").Height = Range("B11:B35").Height
    objxlBook.ActiveSheet.ChartObjects("Chart 1").Width = Range("B11:J11").Width
 
Last edited:

Users who are viewing this thread

Back
Top Bottom