Urgent help!! How to automatically resize all the charts? Thank you!

C

crossingmind

I have made lots of charts for the graphic designer. Now she said to me

my charts are too big when she copies those to illustrator (she has to
resize every one). So she asked me to resize all the charts to the size

she wants in excel. Now, my problem is how I can automatically change
the size of my charts. There are too many and I cannot work on
individual. The deadline is approaching soon. Please help me figure it
out! Thank you very much!
 
G

Guest

Charts have properties you can set via code: Top, Left, Width, Height. To
get the sizes right, manually resize one and then look at it through the VBA
Immediate pane by something like:

? Sheets("Sheet1").ChartObjects(n).Chart.Top
? Sheets("Sheet1").ChartObjects(n).Chart.Left
....

You can use a For Each loop to loop through the charts in each worksheet:
Dim MyChart as ChartObject
For Each MyChart in ActiveSheet.ChartObjects
MyChart.Chart.Top = ...
etc
Next MyChart

Just an outline of the solution, but it can be done without too much hassle.
 
C

crossingmind

Thank you very much for your help! I haven't tried but it looks good
for my problem. Thanks again!
 

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