Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Making charts

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?




  #2   Report Post  
Posted to microsoft.public.excel.programming
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?


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
making charts kyle Excel Discussion (Misc queries) 6 December 13th 09 07:05 AM
Making charts equivalent jimbo Charts and Charting in Excel 3 March 7th 07 02:48 AM
Making charts stendahl_jones Excel Programming 0 June 20th 06 03:31 PM
making charts with vb 6.3 april27 Excel Programming 1 June 16th 06 02:44 PM
Making charts from log files Frederik Vanderhaeghe Charts and Charting in Excel 3 April 28th 06 06:16 PM


All times are GMT +1. The time now is 03:26 PM.

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

About Us

"It's about Microsoft Excel"