LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default help with chart objects

Could someone tell me what I am doing wrong please in this code:

'Dim myChart As Chart

wsheet = ActiveSheet.Name

Charts.Add
cname = ActiveChart.Name
'Set myChart = ActiveChart

ActiveChart.ChartType = xlLineMarkers

ActiveChart.SetSourceData
Source:=Sheets("aulogbd").Range("C2:C23,E2:E23"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).Delete
ActiveChart.SeriesCollection(1).XValues = "=aulogbd!R2C3:R23C3"
ActiveChart.SeriesCollection(1).Name = "=""0,0"""
ActiveChart.Location Whe=xlLocationAsObject, Name:="aulogbd"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
more code
'myChart.Activate
Worksheets(wsheet).ChartObjects(cname).Activate

When I run this I get an error Unable to get the ChartObjects of the
worksheet class at the last line. If I use the myChart logic (Remmed out
here) instead of cname = ActiveChart.Name and
Worksheets(wsheet).ChartObjects(cname).Activate , I get an Automation error.

What I want to do is to create a chart and then go back to that chart at a
later point and add more data to it.

Thanks
Chris


 
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
disconnected chart objects KenRogers Charts and Charting in Excel 0 August 5th 08 08:03 PM
Grouping Objects in a Chart or Graph vito Excel Discussion (Misc queries) 1 February 1st 08 11:11 PM
How to Name Chart Objects DCSwearingen Excel Discussion (Misc queries) 2 July 30th 06 10:27 AM
Chart objects Erich Neuwirth Excel Programming 1 August 13th 04 02:11 AM
Moving Chart Objects Matt Excel Programming 6 May 1st 04 03:34 PM


All times are GMT +1. The time now is 10:28 AM.

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"