cannot set plotarea.height

  • Thread starter Henning Winkler
  • Start date
H

Henning Winkler

Hi,

I try to create some Excel-diagams by VB-code.
Six diagrams are ok. But in the 7th - the last - diagram, I cannot set
the plotarea.height. The chart.height is 80 but the plotarea only 41. I
just recorded my right settings with the macro-recorder and set the
values (71 for plotarea.height), created by the recorder. But after new
run of the my program the plotarea-height is again only 41.
Any idea to solve this problem ?

Thanks Henning
 
J

Jon Peltier

Henning -

If the height you are trying to set is greater than the space available,
you will be unable to stretch the plot area sufficiently. Even if there
is extra white space above the plot area, you must move it up first.

When I adjust the plot area in VBA, first I shrink it to its current
size divided by 3, then I move it to its final resting place, then I
expand the plot area to its desired dimensions.

If you're using Excel 97, and the chart isn't completely in view on the
page (the edge of the chart can't even be touching the top of the first
visible row or the left edge of the first visible column), VBA commands
to move and size the plot area generally give unintended results, but
usually they cause the plot area to grow to the largest size possible.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top