A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Chart resizing during macro run



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2003, 07:51 PM
Mike Green
external usenet poster
 
Posts: n/a
Default Chart resizing during macro run

I have a VBA macro that updates a chart with a new data
range every 2 minutes, and then copies the chart to a Word
document for access via html/web displaying.
Over time, the actual chart gets smaller and smaller in
height (everything is scaled down to adjust) in the chart
area.
This happened with a Win98 Excel version, and still does
with a new installation of Win XP Pro/Excel 2002.

Is there anything I can do to stop this automatic resizing?

Thanks.
  #2  
Old September 17th, 2003, 09:45 PM
Debra Dalgleish
external usenet poster
 
Posts: n/a
Default Chart resizing during macro run

You could set the chart height during the macro:

Sheets("Sheet1").ChartObjects("Chart 1").Height = 250


Mike Green wrote:
I have a VBA macro that updates a chart with a new data
range every 2 minutes, and then copies the chart to a Word
document for access via html/web displaying.
Over time, the actual chart gets smaller and smaller in
height (everything is scaled down to adjust) in the chart
area.
This happened with a Win98 Excel version, and still does
with a new installation of Win XP Pro/Excel 2002.

Is there anything I can do to stop this automatic resizing?

Thanks.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3  
Old October 20th, 2003, 09:04 PM
how_D
external usenet poster
 
Posts: n/a
Default Chart resizing during macro run

I don't think this properly addressed the original question. I am
experiencing this problem too. It is not the OVERALL size of the chart that
gets scaled, just the pie or bar elements INSIDE the chart. The bounding box
of the chart remains the same height and width but the graphical elements
get smaller and smaller within the box.

I am experiencing this and there seems to be no way to lock it down, in
spite of having checked all of what seem to be the appropriate boxes
connected with controlling this.

Bill


On 9/17/03 3:45 PM, in article , "Debra
Dalgleish" wrote:

You could set the chart height during the macro:

Sheets("Sheet1").ChartObjects("Chart 1").Height = 250


Mike Green wrote:
I have a VBA macro that updates a chart with a new data
range every 2 minutes, and then copies the chart to a Word
document for access via html/web displaying.
Over time, the actual chart gets smaller and smaller in
height (everything is scaled down to adjust) in the chart
area.
This happened with a Win98 Excel version, and still does
with a new installation of Win XP Pro/Excel 2002.

Is there anything I can do to stop this automatic resizing?

Thanks.



  #4  
Old October 21st, 2003, 08:21 PM
Jon Peltier
external usenet poster
 
Posts: n/a
Default Chart resizing during macro run

Bill -

You just need to dive a bit deeper into the object model to find other
things to set. The stuff inside a chart is resized by changing the Plot
Area:

With Sheets("Sheet1").ChartObjects("Chart 1").Chart.PlotArea
.Top = 5
.Height = 200
.Left = 11
.Width = 315
End With

I don't know why things don't stay the size you set them. I haven't had
the problem that I can recall, but I've read many complaints about it.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

how_D wrote:
I don't think this properly addressed the original question. I am
experiencing this problem too. It is not the OVERALL size of the chart that
gets scaled, just the pie or bar elements INSIDE the chart. The bounding box
of the chart remains the same height and width but the graphical elements
get smaller and smaller within the box.

I am experiencing this and there seems to be no way to lock it down, in
spite of having checked all of what seem to be the appropriate boxes
connected with controlling this.

Bill


On 9/17/03 3:45 PM, in article , "Debra
Dalgleish" wrote:


You could set the chart height during the macro:

Sheets("Sheet1").ChartObjects("Chart 1").Height = 250


Mike Green wrote:

I have a VBA macro that updates a chart with a new data
range every 2 minutes, and then copies the chart to a Word
document for access via html/web displaying.
Over time, the actual chart gets smaller and smaller in
height (everything is scaled down to adjust) in the chart
area.
This happened with a Win98 Excel version, and still does
with a new installation of Win XP Pro/Excel 2002.

Is there anything I can do to stop this automatic resizing?

Thanks.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.