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: 11
Default Charts.add error

Im trying to add a chart using a macro and I keep getting the following
message:
Method 'Add' of object 'sheets' failed error. What is wrong with the code
below?
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("C45:G45"),
PlotBy _
:=xlRows
ActiveChart.SeriesCollection(1).XValues = "=Sheet3!R1C2:R1C8"
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
End Sub
Thanks in advance for any help......
 
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
Abstracting Error Bar Data From Charts Spiggy Topes Charts and Charting in Excel 3 April 1st 11 02:37 AM
charts.add error Ribeye Excel Discussion (Misc queries) 2 April 13th 06 07:01 PM
Percentage rounding error in charts Tracey Excel Discussion (Misc queries) 4 May 14th 05 04:01 AM
Exporting charts as GIF - error Robbath Excel Programming 3 October 13th 04 10:07 AM
Exporting charts as GIF - error Robbath Excel Programming 0 October 12th 04 05:09 PM


All times are GMT +1. The time now is 04:35 AM.

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"