View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_384_] joel[_384_] is offline
external usenet poster
 
Posts: 1
Default Run-Time Error 1004 on ActiveChart.SeriesCollection(1).Values =


You have variable in a string and the variable will not be replace with
numbers. You have to seperate the string as shown below

ActiveChart.SeriesCollection(1).XValues = _
"=TestRange!" & StartTotalsAddress & ":" & EndTotalsAddress


Not surere why you have the line listed twice


I sometime do this a little different

set StartCategory = TotalsCell.Offset(0, -1)
set EndCategory = TotalsCell.Offset(-1, -1)

Set DataRange = Range(StartCategory,EndCategory)

ActiveChart.SeriesCollection(1).XValues = _
"=" & DataRange.address(External:=True)


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164872

Microsoft Office Help