Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
crossingmind
 
Posts: n/a
Default URGENT help!!! chart size! Thank you!

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!

  #2   Report Post  
Andy Pope
 
Posts: n/a
Default

Hi,

If your charts are chart objects on worksheets then you could use the
following code to size (width/height only) all charts to be the same as
the active one.

Sub ResizeAllCharts()
Dim sngWidth As Single
Dim sngHeight As Single
Dim objCht As ChartObject

sngWidth = ActiveChart.Parent.Width
sngHeight = ActiveChart.Parent.Height

For Each objCht In ActiveSheet.ChartObjects
objCht.Width = sngWidth
objCht.Height = sngHeight
Next
End Sub

This will not attempt to make plot areas or any other chart element the
same.

Another way is the click the selection arrow on the drawing toolbar and
then group select all the chartobjects. You can then format the objects
all at only. Again only in terms of width/height of actual chart.

Cheers
Andy


crossingmind wrote:
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!


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
crossingmind
 
Posts: n/a
Default

Thank you so much Andy. The latter way worked well. The first way I met
a bug on the line
sngWidth = ActiveChart.Parent.Width
Don't know how to debug it. Could you help more? Thanks a lot!

  #4   Report Post  
Andy Pope
 
Posts: n/a
Default

Did you have one of the charts selected?
The code will apply the width/height of the currently selected to chart
to all the others on the sheet.

crossingmind wrote:
Thank you so much Andy. The latter way worked well. The first way I met
a bug on the line
sngWidth = ActiveChart.Parent.Width
Don't know how to debug it. Could you help more? Thanks a lot!


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #5   Report Post  
crossingmind
 
Posts: n/a
Default

Yes, I did select one chart for try, and then the bug window popped
out. Dunno why. Thanks a lot!



  #6   Report Post  
Andy Pope
 
Posts: n/a
Default

Me neither, I just tried my posted code in another multi chart worksheet
without incident. ???

crossingmind wrote:
Yes, I did select one chart for try, and then the bug window popped
out. Dunno why. Thanks a lot!


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Chart size Rick Charts and Charting in Excel 6 June 23rd 05 12:30 AM
ho to change in the bubble chart the bubble position and size laszlo Charts and Charting in Excel 0 March 25th 05 04:45 PM
How do I enlarge chart size in document? WilkesConcierge Excel Discussion (Misc queries) 1 February 24th 05 05:02 PM
Impedding/Overlaying Charts Phil Hageman Charts and Charting in Excel 4 December 17th 04 07:25 PM
export chart - size problem Art Parra Charts and Charting in Excel 1 December 7th 04 01:58 AM


All times are GMT +1. The time now is 08:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"