R
R Tanner
Anyone have any ideas what is wrong with this code?
Sub modifyseries()
Dim cht As Chart
Dim srs(1 To 4) As series
Set cht = ActiveSheet.ChartObjects("Chart 5").Chart
Set srs(1) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(1)
Set srs(2) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(2)
Set srs(3) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(3)
Set srs(4) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(4)
If cht.SeriesCollection(1).XValues <> 0 Then
srs(1).Points.Visible = False
End If
End Sub
I want to hide a data point if it equals 0. Thanks..
Sub modifyseries()
Dim cht As Chart
Dim srs(1 To 4) As series
Set cht = ActiveSheet.ChartObjects("Chart 5").Chart
Set srs(1) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(1)
Set srs(2) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(2)
Set srs(3) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(3)
Set srs(4) = Sheets(3).ChartObjects("Chart
5").Chart.SeriesCollection(4)
If cht.SeriesCollection(1).XValues <> 0 Then
srs(1).Points.Visible = False
End If
End Sub
I want to hide a data point if it equals 0. Thanks..