Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default unable to set the values property of the series class

I get this error message "unable to set the Values property of the Series
class" when trying to re-set a chart series to another range. Can anyone
help?

CODE:

Worksheets("analyze").ChartObjects("resChart").Act ivate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Values = "=results!R4C4:R4C63"

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default unable to set the values property of the series class

Try

ActiveChart.SeriesCollection(1).Formula = "=results!R4C4:R4C63"

instead of values

"BHatMJ" wrote:

I get this error message "unable to set the Values property of the Series
class" when trying to re-set a chart series to another range. Can anyone
help?

CODE:

Worksheets("analyze").ChartObjects("resChart").Act ivate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Values = "=results!R4C4:R4C63"

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default unable to set the values property of the series class

Thank you for your help but .Formula did not work. The following code seems
to work but will sporadically lock up and then cause the error:

Worksheets(1).ChartObjects(1).Chart.SeriesCollecti on(3).Values = _
Worksheets(2).Range("D3:BK3")

It seems as if all of these should work and I cannot understand why a series
seems to "lock up" after several runs of the program. Once "locked", it
always creates the error. If I delete the chart and re-create a new one, the
code works again.

Can anyone explain or help?


"Ethoros" wrote:

Try

ActiveChart.SeriesCollection(1).Formula = "=results!R4C4:R4C63"

instead of values

"BHatMJ" wrote:

I get this error message "unable to set the Values property of the Series
class" when trying to re-set a chart series to another range. Can anyone
help?

CODE:

Worksheets("analyze").ChartObjects("resChart").Act ivate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Values = "=results!R4C4:R4C63"

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default unable to set the values property of the series class

This code should help you. it finds and replaces text in in series.

<code
Sub Chart_Series_Replacer()


If ActiveSheet.chartobjects.Count 0 Then
S_Str = InputBox("Please input string you wish to find", "Search Text")
R_Str = InputBox("Please input string you wish to Replace With",
"Replace Text")
For i = 1 To ActiveSheet.chartobjects.Count
With ActiveSheet.chartobjects(i).Chart
For intSeries = 1 To .SeriesCollection.Count
strData = .SeriesCollection(intSeries).Formula
strData = Replace(UCase(strData), UCase(S_Str), UCase(R_Str))
.SeriesCollection(intSeries).Formula = strData
Next
End With
Next i
End If
End Sub
</code

"BHatMJ" wrote:

Thank you for your help but .Formula did not work. The following code seems
to work but will sporadically lock up and then cause the error:

Worksheets(1).ChartObjects(1).Chart.SeriesCollecti on(3).Values = _
Worksheets(2).Range("D3:BK3")

It seems as if all of these should work and I cannot understand why a series
seems to "lock up" after several runs of the program. Once "locked", it
always creates the error. If I delete the chart and re-create a new one, the
code works again.

Can anyone explain or help?


"Ethoros" wrote:

Try

ActiveChart.SeriesCollection(1).Formula = "=results!R4C4:R4C63"

instead of values

"BHatMJ" wrote:

I get this error message "unable to set the Values property of the Series
class" when trying to re-set a chart series to another range. Can anyone
help?

CODE:

Worksheets("analyze").ChartObjects("resChart").Act ivate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Values = "=results!R4C4:R4C63"

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default unable to set the values property of the series class

Thank you Ethoros but, inexplicably, it still does not work. When I set
..Formula = "=d4:bk4", it places a text box with the formula string on the
chart.

"Ethoros" wrote:

This code should help you. it finds and replaces text in in series.

<code
Sub Chart_Series_Replacer()


If ActiveSheet.chartobjects.Count 0 Then
S_Str = InputBox("Please input string you wish to find", "Search Text")
R_Str = InputBox("Please input string you wish to Replace With",
"Replace Text")
For i = 1 To ActiveSheet.chartobjects.Count
With ActiveSheet.chartobjects(i).Chart
For intSeries = 1 To .SeriesCollection.Count
strData = .SeriesCollection(intSeries).Formula
strData = Replace(UCase(strData), UCase(S_Str), UCase(R_Str))
.SeriesCollection(intSeries).Formula = strData
Next
End With
Next i
End If
End Sub
</code

"BHatMJ" wrote:

Thank you for your help but .Formula did not work. The following code seems
to work but will sporadically lock up and then cause the error:

Worksheets(1).ChartObjects(1).Chart.SeriesCollecti on(3).Values = _
Worksheets(2).Range("D3:BK3")

It seems as if all of these should work and I cannot understand why a series
seems to "lock up" after several runs of the program. Once "locked", it
always creates the error. If I delete the chart and re-create a new one, the
code works again.

Can anyone explain or help?


"Ethoros" wrote:

Try

ActiveChart.SeriesCollection(1).Formula = "=results!R4C4:R4C63"

instead of values

"BHatMJ" wrote:

I get this error message "unable to set the Values property of the Series
class" when trying to re-set a chart series to another range. Can anyone
help?

CODE:

Worksheets("analyze").ChartObjects("resChart").Act ivate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Values = "=results!R4C4:R4C63"

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
Unable to set the XValues property of the Series class Ben Charts and Charting in Excel 7 December 7th 06 10:01 PM
Unable to set the Values property of the Series class rafael garcia Charts and Charting in Excel 1 September 25th 06 04:31 PM
Unable to set the formula property of the series class Malhar Charts and Charting in Excel 1 July 24th 06 05:50 PM
Unable to set the XValues property of the Series class ramkumar_cpt Charts and Charting in Excel 5 November 29th 05 02:13 PM
VBA error: Unable to set the Values property of the Series class Marco Shaw Charts and Charting in Excel 1 July 12th 05 02:34 PM


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