Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
Xavier
 
Posts: n/a
Default Problem to modify the size of PlotArea

Hello,

I am trying to modify a chart so that it prints in a 20cm x 17,5cm frame. I
do understand that this is governed by the plotarea.insideheight and
plotarea.insidewidth properties. I also do understant that these properties
are read-only. So far my code is the following:

With ActiveChart
.SizeWithWindow = False
.PageSetup.ChartSize = xlScreenSize
.PlotArea.Width = 567
.PlotArea.Height = 496
Do While .PlotArea.InsideWidth < 567
.PlotArea.Width = .PlotArea.Width + 1
Loop

Do While .PlotArea.InsideHeight < 496
.PlotArea.Height = .PlotArea.Height + 1
Loop

End With


The problem I am facing is the following: the first do...loop works fine and
if I print the result, I do get exactly 20cm. However, the second do...loop
loops indefinitely, in debugging mode, I see that the initial value of
..PlotArea is 451 (and not 496) and during the loop, it never gets increased
???

Does anyone know what am I doing wrong ?

Thanks,

Xavier



  #2   Report Post  
Posted to microsoft.public.excel.charting
Xavier
 
Posts: n/a
Default Problem to modify the size of PlotArea

Problem solved:

The margins defined in my page setup were limiting the hight that could be
used for the chart. Reducing the margins solved the issue.

Xavier

"Xavier" wrote in message
...
Hello,

I am trying to modify a chart so that it prints in a 20cm x 17,5cm frame.
I do understand that this is governed by the plotarea.insideheight and
plotarea.insidewidth properties. I also do understant that these
properties are read-only. So far my code is the following:

With ActiveChart
.SizeWithWindow = False
.PageSetup.ChartSize = xlScreenSize
.PlotArea.Width = 567
.PlotArea.Height = 496
Do While .PlotArea.InsideWidth < 567
.PlotArea.Width = .PlotArea.Width + 1
Loop

Do While .PlotArea.InsideHeight < 496
.PlotArea.Height = .PlotArea.Height + 1
Loop

End With


The problem I am facing is the following: the first do...loop works fine
and if I print the result, I do get exactly 20cm. However, the second
do...loop loops indefinitely, in debugging mode, I see that the initial
value of .PlotArea is 451 (and not 496) and during the loop, it never gets
increased ???

Does anyone know what am I doing wrong ?

Thanks,

Xavier





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
importing csv files, problem with date formats jiwolf Excel Worksheet Functions 5 March 7th 06 12:48 AM
print problem custom paper size Henry Excel Discussion (Misc queries) 0 February 27th 06 08:26 PM
Calendar - change of a size of this object Drahos Excel Worksheet Functions 1 February 14th 06 06:01 PM
Parsing Problem Gloria Lewis Excel Discussion (Misc queries) 6 January 23rd 06 06:06 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 12:40 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"