Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send a variable to a series in a chart..

Status
Not open for further replies.

neunelfer

Technical User
Joined
Jul 22, 2003
Messages
5
Location
US
Hi there,

I'm not very experienced in programming VBA, but I have to..
My problem is, that I want to send a variable to a series in a chart..
and I tried it like this :

Worksheets("L CDMBAN1").ChartObjects(1).Activate
ActiveChart.PlotArea.Select
'MsgBox ("=L CDMBAN1!R3C" & iColData & ":R" & intSweep & "C" & iColData)
ActiveChart.SeriesCollection(iColDataInt).XValues = "=L CDMBAN1!R3C" & iColData & ":R" & intSweep & "C" & iColData


I always get a $#@% error, and tried a ton of changes, but nothing helps.

Please excuse my bad english, I'm german
 
Hi,

Not sure exactly what you are doing, but here's some mods to your code that works
Code:
    iColDataInt = 1
    iColData = 3
    ActiveSheet.ChartObjects(1).Chart.SeriesCollection(iColDataInt).XValues = "=" & ActiveSheet.Name & "!R3C" & iColData & ":R6" & "C" & iColData


Skip,
Skip@TheOfficeExperts.com
 
shoot ..

I still get an runtime error 1004: unable to set XValues property of the series class.

Somebody knows what that means?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top