Thread: Making charts
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Making charts

Hi
This is similar to setting the position of the chart

Set myChart = ChartObjects("Datachart")
With myChart.Parent
.Width = Range("C2:M2").Width
.Height = Range("C2:C10").Height
end with

or use absolute measurements instead of the range references. Of
course, you can combine postion and size inside the with...end with. I
would let the plot area take care of itself as there are usually
headings and series labels to fit on?

regards
Paul


Fabrizio wrote:
I am writing a macro that creates several charts. Now I want to be able to
assign the size of the charts (as well as the size of e.g. the plot area) in
the code so that the charts will be exactly the same size. How do you write
the code for this? When recording a macro for this I just get code that
changes the size from some default setting but how do you decide the size
directly?