PC Review


Reply
Thread Tools Rate Thread

Adding Chart problem

 
 
New Member
Join Date: Apr 2010
Posts: 2
 
      26th Apr 2010
I have a problem when I try to run the below code for drawing a chart form data range in Excel sheet , for example the data in column E vs. column A as Xvalue, note that the end of the data range are variable , so I declare a variable called myD as integer for first limiting the end of the data series range

So could you advice?

------------------------------------------
Sub Button9_Click()
'
'
Dim myD As Integer

myD = Columns(6).End(xlDown).Row
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "=""|Fr|"""
ActiveChart.SeriesCollection(1).Values = Range(Cells(1, 6), Cells(myD, 6))
ActiveChart.SeriesCollection(1).XValues = Range(Cells(1, 1), Cells(myD, 1))


End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Chart - adding Grand Total to chart sabot Microsoft Access 0 24th Oct 2008 03:06 PM
Problem adding chart (Office 2007) Nicholas Poh Microsoft Excel Discussion 12 4th Sep 2008 04:38 PM
Problem adding chart (Office 2007) Nicholas Poh Microsoft Excel Charting 12 4th Sep 2008 04:38 PM
Best tool for adding a pivot chart like chart to a report? Kyle Jedrusiak Microsoft Access Reports 1 23rd Aug 2007 07:34 PM
Problem adding Series XValues to Chart using VBA =?Utf-8?B?U2VhbiBDdXJyeQ==?= Microsoft Excel Charting 0 14th Mar 2005 12:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:29 AM.