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