ActiveChart modify size and anchoring

leocoppens

Board Regular
Joined
Mar 7, 2007
Messages
53
Hi,

I'm struggling to find the way to modify the title's properties of a chart I'm inserting in a worksheet.

I generate the chart from a PivotTable report with

ActiveSheet.Shapes.AddChart.Select



Does anybody know how to, for example, set it to be at a certain location within the spreadsheet and modify it's size?

Thanks a lot for the interest!

Leo
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hello Leo

Here's an example:

<font face=Courier New>    <SPAN style="color:#00007F">With</SPAN> Charts("Chart1").ChartTitle<br>        .Text = "Hello"<br>        .Left = 10<br>        <SPAN style="color:#00007F">With</SPAN> .Font<br>            .FontStyle = "Bold"<br>            .Size = 18<br>            .ColorIndex = 49<br>        <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br>        .AutoScaleFont = <SPAN style="color:#00007F">True</SPAN><br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN></FONT>
 
Upvote 0
Hi Jon and all,

I finally found it, it's in the ChartArea property of the activechart object. As a test I did something like this:

ActiveSheet.Shapes.AddChart.Select
With ActiveChart.ChartArea
.Width = 600
.Height = 200
.Top = 300
.Left = 50
End With

Thanks anyway :)

Best regards,
Leo
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,616
Members
449,238
Latest member
wcbyers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top