This code produces 16 points on the graph - RC1 to RC16. How do I show the data value on each of the 16 points on the graph? Incidentaly, .ColumnLabel = "LABEL" doesn't produce a column label.
Private Sub cmdDrawGraph_Click()
Dim rc() As Integer
rc1 = 1
rc2 = 2
rc3 = 4
rc4 = 4
rc5 = 6
rc6 = 6
rc7 = 8
rc8 = 8
rc9 = 9
rc10 = 8
rc11 = 7
rc12 = 7
rc13 = 6
rc14 = 6
rc15 = 5
rc16 = 2
Dim intIndex As Integer '*******************
Dim strAbbrev(1 To 16) As String 'Names the Rows
strAbbrev(1) = "3/23/2009 8:12:13 AM"
strAbbrev(2) = "3/23/2009 8:12:24 AM"
strAbbrev(3) = "3/23/2009 8:12:33 AM"
strAbbrev(4) = "3/23/2009 8:12:34 AM"
strAbbrev(5) = "3/23/2009 8:12:35 AM"
strAbbrev(6) = "3/23/2009 8:12:36 AM"
strAbbrev(7) = "3/23/2009 8:12:37 AM"
strAbbrev(8) = "3/23/2009 8:12:38 AM"
strAbbrev(9) = "3/23/2009 8:12:39 AM"
strAbbrev(10) = "3/23/2009 8:12:40 AM"
strAbbrev(11) = "3/23/2009 8:12:41 AM"
strAbbrev(12) = "3/23/2009 8:12:42 AM"
strAbbrev(13) = "3/23/2009 8:12:43 AM"
strAbbrev(14) = "3/23/2009 8:12:44 AM"
strAbbrev(15) = "3/23/2009 8:12:45 AM"
strAbbrev(16) = "3/23/2009 8:12:46 AM"
MSChart1.RowCount = 16
For intIndex = 1 To 16
MSChart1.Row = intIndex
MSChart1.RowLabel = strAbbrev(intIndex) 'Names the Rows
Next intIndex '********************
With MSChart1
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Name = ariel
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Size = 12
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Style = Bold
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.VtColor.Set 0, 153, 0
.TitleText = "TEST DATA"
.ChartType = VtChChartType2dLine
.ColumnCount = 1 'one plotted line
.RowCount = 16 'number of horizontal points
.Column = 1
.ColumnLabel = "LABEL" 'doesn't work
.Row = 1
For Row = 1 To 16
.Row = Row
Select Case Row
Case 1
.Data = rc1
Case 2
.Data = rc2
Case 3
.Data = rc3
Case 4
.Data = rc4
Case 5
.Data = rc5
Case 6
.Data = rc6
Case 7
.Data = rc7
Case 8
.Data = rc8
Case 9
.Data = rc9
Case 10
.Data = rc10
Case 11
.Data = rc11
Case 12
.Data = rc12
Case 13
.Data = rc13
Case 14
.Data = rc14
Case 15
.Data = rc15
Case 16
.Data = rc16
End Select
Next Row
End With
End Sub
Private Sub cmdDrawGraph_Click()
Dim rc() As Integer
rc1 = 1
rc2 = 2
rc3 = 4
rc4 = 4
rc5 = 6
rc6 = 6
rc7 = 8
rc8 = 8
rc9 = 9
rc10 = 8
rc11 = 7
rc12 = 7
rc13 = 6
rc14 = 6
rc15 = 5
rc16 = 2
Dim intIndex As Integer '*******************
Dim strAbbrev(1 To 16) As String 'Names the Rows
strAbbrev(1) = "3/23/2009 8:12:13 AM"
strAbbrev(2) = "3/23/2009 8:12:24 AM"
strAbbrev(3) = "3/23/2009 8:12:33 AM"
strAbbrev(4) = "3/23/2009 8:12:34 AM"
strAbbrev(5) = "3/23/2009 8:12:35 AM"
strAbbrev(6) = "3/23/2009 8:12:36 AM"
strAbbrev(7) = "3/23/2009 8:12:37 AM"
strAbbrev(8) = "3/23/2009 8:12:38 AM"
strAbbrev(9) = "3/23/2009 8:12:39 AM"
strAbbrev(10) = "3/23/2009 8:12:40 AM"
strAbbrev(11) = "3/23/2009 8:12:41 AM"
strAbbrev(12) = "3/23/2009 8:12:42 AM"
strAbbrev(13) = "3/23/2009 8:12:43 AM"
strAbbrev(14) = "3/23/2009 8:12:44 AM"
strAbbrev(15) = "3/23/2009 8:12:45 AM"
strAbbrev(16) = "3/23/2009 8:12:46 AM"
MSChart1.RowCount = 16
For intIndex = 1 To 16
MSChart1.Row = intIndex
MSChart1.RowLabel = strAbbrev(intIndex) 'Names the Rows
Next intIndex '********************
With MSChart1
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Name = ariel
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Size = 12
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.Style = Bold
.Plot.Axis(VtChAxisIdX).Labels(1).VtFont.VtColor.Set 0, 153, 0
.TitleText = "TEST DATA"
.ChartType = VtChChartType2dLine
.ColumnCount = 1 'one plotted line
.RowCount = 16 'number of horizontal points
.Column = 1
.ColumnLabel = "LABEL" 'doesn't work
.Row = 1
For Row = 1 To 16
.Row = Row
Select Case Row
Case 1
.Data = rc1
Case 2
.Data = rc2
Case 3
.Data = rc3
Case 4
.Data = rc4
Case 5
.Data = rc5
Case 6
.Data = rc6
Case 7
.Data = rc7
Case 8
.Data = rc8
Case 9
.Data = rc9
Case 10
.Data = rc10
Case 11
.Data = rc11
Case 12
.Data = rc12
Case 13
.Data = rc13
Case 14
.Data = rc14
Case 15
.Data = rc15
Case 16
.Data = rc16
End Select
Next Row
End With
End Sub