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: 4
Default chart with macro

i record a macro which plot a chart getting its data from sheet1's columns.
it's works inwhich created Excel workbook but when i try to run in different
Excel workbook which has different name, macro returns "unable to set Xvalues
property of series class" eror. I think this is because of the column
adressing for "chart series data". How can i create a macro which gets its
data from active workbook's active sheet columns?

Charts.Add
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.SetSourceData
Source:=ThisWorkbook.Sheets("Sheet1").Range("H100" )
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection.NewSeries
'code fail here...
ActiveChart.SeriesCollection(1).XValues = "=Sheet1!C5"
ActiveChart.SeriesCollection(1).Values = "=Sheet1!C4"
 
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 change position of chart labels on line chart Shane Henderson[_2_] Charts and Charting in Excel 1 May 27th 11 09:31 AM
Chart macro sonicscooter Charts and Charting in Excel 4 April 19th 09 05:32 PM
About chart with a macro alvin Kuiper Excel Programming 1 February 11th 06 09:51 PM
Chart using Macro Abhijeet Charts and Charting in Excel 0 August 1st 05 05:00 PM
Chart Macro kwedde01[_2_] Excel Programming 1 June 14th 05 12:40 PM


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