x Axes valus

  • Thread starter Thread starter nextwave66
  • Start date Start date
N

nextwave66

hi
i have a problem and no more ideas to solve it

i have a 3d diagramm: sensor-valus on the z axis, sensor on the y axis
and on the x axis should be the time read out of my excel sheet.
but there´s the problem, every time i try to put the x axis valus via
VBA i get a runTime error 1004 (cant set Range method of Series
collection objekt).
i tryed it with the macro recorder and geot the same error.

code that sould work but don´t work

Charts("BergeS16").SeriesCollection(1).XValues = "=Sheet4!S1Z1:S41Z1"

Are there any other posibilities to change the x axis valus, or any
ideas were my fault could be?

tx! CU!
Patrick
 
Patrick -

Try this:

Dim xRange as Range
Set xRange = Worksheets("Data").Cells(1,1).resize(41,1)
Charts("BergeS16").SeriesCollection(1).XValues = xRange

- Jon
 
hi Jon!

thankx for your answer..

but it didn´t work too
Any other idea i can try?
another possibility?

CU!

Patrick
 
Maybe I misnamed your sheet. Does this work:

Dim xRange as Range
Set xRange = Worksheets("Sheet4").Cells(1,1).resize(41,1)
Charts("BergeS16").SeriesCollection(1).XValues = xRange

- Jon
 
Back
Top