Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 25
Default PlotArea is different between Excel 2003 and Excel 2007

All,

I am having difficulty programmatically changing chart parameters. For
instance, I want to modify the PlotArea.Height of one of my charts.
When I resize it manually (i.e. increase the PlotArea by a factor of
three) everything scales just fine. When I try to set <chart.PlotArea
in VB I get an error message:

Number: 1004
Description: Chart Layout Failed

Any thoughts?

Bill
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default PlotArea is different between Excel 2003 and Excel 2007

Hi,

Is that VB or did you really mean VBA?
And can you post the code you are using.


Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"bill" wrote in message
...
All,

I am having difficulty programmatically changing chart parameters. For
instance, I want to modify the PlotArea.Height of one of my charts.
When I resize it manually (i.e. increase the PlotArea by a factor of
three) everything scales just fine. When I try to set <chart.PlotArea
in VB I get an error message:

Number: 1004
Description: Chart Layout Failed

Any thoughts?

Bill


  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 25
Default PlotArea is different between Excel 2003 and Excel 2007

On Nov 20, 11:59 am, "Andy Pope" wrote:
Hi,

Is that VB or did you really mean VBA?
And can you post the code you are using.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excelhttp://www.andypope.info"bill" wrote in message

...



All,


I am having difficulty programmatically changing chart parameters. For
instance, I want to modify the PlotArea.Height of one of my charts.
When I resize it manually (i.e. increase the PlotArea by a factor of
three) everything scales just fine. When I try to set <chart.PlotArea
in VB I get an error message:


Number: 1004
Description: Chart Layout Failed


Any thoughts?


Bill- Hide quoted text -


- Show quoted text -


Hi Andy,

VBA. Here is some of the code. The stuff in between is too ugly to
post. Basically, the chart is created, populated, and that is it:

......

Set zNewChart = zNewBook.Charts.Add(After:=zNewBook.Sheets(nChartC tr))

.....
add data series
label axes
fill in title
... bunch of other stuff .....


zNewChart.PlotArea.Height = zNewChart.PlotArea.Height - 20 ' this is
the spot where the error message occurs


The other anomaly is that if I put a breakpoint on the above, and then
continue, it does not generate an error. However, the PlotArea.Height
does not really change. Also, when I look at the Height before trying
to change it, it has a value of 473.xxxx. However, when I open the
spreadsheet and check it out, it is clearly not 473 in Height because
the DataTable is taking up around 4/5 of the chart area. In addition
to all of this, if I change Height immediately after instantiating the
chart, then there is no error message. However, the final Height of
the PlotArea is still entirely different than 453 (i.e. it is much
smaller).

Hope that wasn't too confusing,

Bill
  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
Default PlotArea is different between Excel 2003 and Excel 2007

Hi Bill,

It wasn't confusing ;)
But I am unable to replicate your error. For me adjusting the height of
the plotarea works.

The new chart OM is a little flakey. So you may have some luck by simply
messing with properties in order to get the chart to refresh itself.

If you want you can email me the file offline and I will take a look.

Cheers
Andy

bill wrote:
On Nov 20, 11:59 am, "Andy Pope" wrote:

Hi,

Is that VB or did you really mean VBA?
And can you post the code you are using.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excelhttp://www.andypope.info"bill" wrote in message

...




All,


I am having difficulty programmatically changing chart parameters. For
instance, I want to modify the PlotArea.Height of one of my charts.
When I resize it manually (i.e. increase the PlotArea by a factor of
three) everything scales just fine. When I try to set <chart.PlotArea
in VB I get an error message:


Number: 1004
Description: Chart Layout Failed


Any thoughts?


Bill- Hide quoted text -


- Show quoted text -



Hi Andy,

VBA. Here is some of the code. The stuff in between is too ugly to
post. Basically, the chart is created, populated, and that is it:

.....

Set zNewChart = zNewBook.Charts.Add(After:=zNewBook.Sheets(nChartC tr))

....
add data series
label axes
fill in title
... bunch of other stuff .....


zNewChart.PlotArea.Height = zNewChart.PlotArea.Height - 20 ' this is
the spot where the error message occurs


The other anomaly is that if I put a breakpoint on the above, and then
continue, it does not generate an error. However, the PlotArea.Height
does not really change. Also, when I look at the Height before trying
to change it, it has a value of 473.xxxx. However, when I open the
spreadsheet and check it out, it is clearly not 473 in Height because
the DataTable is taking up around 4/5 of the chart area. In addition
to all of this, if I change Height immediately after instantiating the
chart, then there is no error message. However, the final Height of
the PlotArea is still entirely different than 453 (i.e. it is much
smaller).

Hope that wasn't too confusing,

Bill

  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default PlotArea is different between Excel 2003 and Excel 2007

There occasionally seem to be problems in 2007 with charts that were created
in an earlier version of Excel.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Andy Pope" wrote in message
...
Hi Bill,

It wasn't confusing ;)
But I am unable to replicate your error. For me adjusting the height of
the plotarea works.

The new chart OM is a little flakey. So you may have some luck by simply
messing with properties in order to get the chart to refresh itself.

If you want you can email me the file offline and I will take a look.

Cheers
Andy

bill wrote:
On Nov 20, 11:59 am, "Andy Pope" wrote:

Hi,

Is that VB or did you really mean VBA?
And can you post the code you are using.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excelhttp://www.andypope.info"bill"
wrote in message

...




All,

I am having difficulty programmatically changing chart parameters. For
instance, I want to modify the PlotArea.Height of one of my charts.
When I resize it manually (i.e. increase the PlotArea by a factor of
three) everything scales just fine. When I try to set <chart.PlotArea
in VB I get an error message:

Number: 1004
Description: Chart Layout Failed

Any thoughts?

Bill- Hide quoted text -

- Show quoted text -



Hi Andy,

VBA. Here is some of the code. The stuff in between is too ugly to
post. Basically, the chart is created, populated, and that is it:

.....

Set zNewChart = zNewBook.Charts.Add(After:=zNewBook.Sheets(nChartC tr))

....
add data series
label axes
fill in title
... bunch of other stuff .....


zNewChart.PlotArea.Height = zNewChart.PlotArea.Height - 20 ' this is
the spot where the error message occurs


The other anomaly is that if I put a breakpoint on the above, and then
continue, it does not generate an error. However, the PlotArea.Height
does not really change. Also, when I look at the Height before trying
to change it, it has a value of 473.xxxx. However, when I open the
spreadsheet and check it out, it is clearly not 473 in Height because
the DataTable is taking up around 4/5 of the chart area. In addition
to all of this, if I change Height immediately after instantiating the
chart, then there is no error message. However, the final Height of
the PlotArea is still entirely different than 453 (i.e. it is much
smaller).

Hope that wasn't too confusing,

Bill





  #6   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 25
Default PlotArea is different between Excel 2003 and Excel 2007

On Nov 20, 4:08 pm, "Jon Peltier"
wrote:
There occasionally seem to be problems in 2007 with charts that were created
in an earlier version of Excel.

- Jon


Except that I am creating then from scratch in 2007.

Bill
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
Embedded Excel 2003 spreadsheet in web page won't work with Excel 2007 Ed Flecko Excel Discussion (Misc queries) 0 August 27th 07 09:01 PM
Data Import to Excel Issue with Excel 2007 and Excel 2003 on same Melsh Excel Discussion (Misc queries) 0 August 1st 07 09:32 PM
Excel 2007 xlsx files open as Read-Only in Excel 2003 after Compat Tim Excel Discussion (Misc queries) 1 March 31st 07 11:12 AM
Excel 2007 unrecognized file format in Excel 2003 More options EagleOne Excel Discussion (Misc queries) 1 February 28th 07 01:44 PM
Inexact? InsideTop and InsideLeft Method of PlotArea (Excel 97) jintao Charts and Charting in Excel 4 July 21st 05 09:47 AM


All times are GMT +1. The time now is 04:58 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"