Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Excel Macro for Charts

I am trying to create a Macro to create some charts and I am receiving
and error:

Run Time Error '1004'
Unable to set the XValues property of the Series class

The following is my code

Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet5"
ActiveChart.SetSourceData
Source:=Sheets("Sheet4").Range("A3:A23,C3:C23"), _
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=(Sheet4!A8,A15,A23)"
ActiveChart.SeriesCollection(1).Values = _
"=(Sheet4!C9,C16,C24)"
ActiveChart.SeriesCollection(1).Name = "=Sheet4!A2"

All of the referenced cells have data in worksheet. The Macro is ran
from sheet5

Thank you for all of your help
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
Macro to copy Excel charts to existing Powerpoint file [email protected] Excel Programming 1 September 18th 06 08:32 PM
VBA Code, My excel macro creates the charts on top of each other osman[_5_] Excel Programming 3 July 24th 06 09:53 PM
Excel Macro to open file, load & do charts, functional but not usable/not a good prog osman[_2_] Excel Programming 0 May 16th 06 02:18 PM
Creating a macro to copy a number of charts from Excel to PPT Brian Excel Programming 0 December 16th 05 04:53 PM
Global macro for resizing and reformatting Excel charts Sol Apache Excel Programming 5 October 24th 05 03:31 AM


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