Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot Activate Chart Area in Chart. Chart Object Failed

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Cannot Activate Chart Area in Chart. Chart Object Failed

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.Plot Area
' do whatever to the plot area
End With

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


wrote in message
ups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot Activate Chart Area in Chart. Chart Object Failed

Thanks. I used your suggested code but now I am getting a 424 Object
required error.

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

Thoughts?

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
need variable time axis available in XY chart for area chart Byron Charts and Charting in Excel 0 February 6th 10 03:58 PM
need variable time axis available in XY chart for area chart Byron Charts and Charting in Excel 0 February 6th 10 03:17 PM
how to remove dotted line with words chart area from around chart desof Charts and Charting in Excel 2 May 13th 09 10:18 PM
Paste Method of Worksheet Failed When Copying Chart Object Larry[_3_] Excel Discussion (Misc queries) 0 May 17th 07 11:02 PM
Have chart lines take up full area of chart from left to right Roger[_20_] Excel Programming 1 June 22nd 05 09:02 PM


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