PC Review


Reply
Thread Tools Rate Thread

Cannot Activate Chart Area in Chart. Chart Object Failed

 
 
ahperez@gmail.com
Guest
Posts: n/a
 
      3rd Aug 2006
I am working to update the series source in a chart. I have an excel
template in which I copy 2 worksheets into my workbook.

I would like to edit one chart using my VBA code. I am getting Method
PlotArea of Object '_Chart' Failed.

The code is below.

Thanks for your help.

Sheets(1).Select
ActiveSheet.ChartObjects("WhatMatters").Activate
ActiveChart.PlotArea.Select

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      6th Aug 2006
1. If the chart has no data to plot, there may not be a plot area to select.

2. Don't keep selecting all the objects. It will be faster and less
distracting this way:

With ActiveSheet.ChartObjects("WhatMatters").Chart.PlotArea
' do whatever to the plot area
End With

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


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am working to update the series source in a chart. I have an excel
> template in which I copy 2 worksheets into my workbook.
>
> I would like to edit one chart using my VBA code. I am getting Method
> PlotArea of Object '_Chart' Failed.
>
> The code is below.
>
> Thanks for your help.
>
> Sheets(1).Select
> ActiveSheet.ChartObjects("WhatMatters").Activate
> ActiveChart.PlotArea.Select
>



 
Reply With Quote
 
Tony
Guest
Posts: n/a
 
      8th Aug 2006
Thanks. I used your suggested code but now I am getting a 424 Object
required error.

'error here
With ActiveSheet.ChartObjects("WhatMatters").Chart.PlotArea
.SeriesCollection(1).XValues = "='" & managerDataSheet & "'!" &
graphXValueAddress
.SeriesCollection(1).Values = "='" & managerDataSheet & "'!" &
completeGraphAddress
End With

Thoughts?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need variable time axis available in XY chart for area chart Byron Microsoft Excel Charting 0 6th Feb 2010 03:58 PM
Pivot chart suddenly prints with black in chart area Elsa Microsoft Access Forms 0 1st Jun 2009 06:51 AM
how to remove dotted line with words chart area from around chart desof Microsoft Excel Charting 2 13th May 2009 10:18 PM
Cobine a stacked area chart with a line chart RSunday Microsoft Powerpoint 2 6th Apr 2008 02:19 PM
pasting chart shows chart area, not the chart =?Utf-8?B?UGlyam8=?= Microsoft Powerpoint 3 13th Oct 2005 04:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:41 AM.