Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Size & Position charts on Sheet

Bruce -

I avoid the scalewidth and scaleheight. To resize all the charts, use a
loop like this:

Dim ChtOb As ChartObject
For Each ChtOb In ActiveSheet.ChartObjects
With ChtOb
' dimensions in points
.Height = 200
.Width = 275
End With
Next

If you have an algorithm for arraying your chart objects, you can use a
similar loop to adjust the .top and .left of each chart object.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Bruce wrote:

I would like to resize and reposition a number of charts on my worksheet,
however I do not know how many charts there will be or what chart number they
will be.

So far I have setup code to add the charts as my chart array changes in size.

1) How do I set the scalewidth and scaleheight for all charts

I have tried changing this;
ActiveSheet.Shapes("Chart 23").ScaleWidth 0.6, msoFalse, msoScaleFromTopLeft
into
ActiveChart.ChartArea.ScaleWidth 0.91, msoFalse, msoScaleFromTopLeft
but ive got something wrong....

2) For the positioning, say if I had 10 charts on the worksheet it would
arrange them as 2x5. When the array is 8 charts it would do 2x4. Any ideas on
how to do this?

Bruce


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
Fix size and position of comment viettuyen Excel Discussion (Misc queries) 1 April 29th 09 12:41 PM
how to change font size of datalabels of two charts in a sheet amrezzat Charts and Charting in Excel 1 May 9th 06 01:04 AM
Window Position & Size [email protected] Excel Discussion (Misc queries) 4 May 18th 05 05:21 PM
Chart size/position Srikanth Ganesan[_2_] Excel Programming 1 September 1st 04 02:22 AM
Position/Size a MessageBow Stuart[_5_] Excel Programming 3 June 28th 04 05:02 AM


All times are GMT +1. The time now is 01:43 PM.

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"