Article ID: 201958
Article Last Modified on 10/20/2003
Private Sub Command1_Click()
Dim rowLabelCount As Integer
Dim columnLabelCount As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim labelIndex As Integer
MSChart1.chartType = VtChChartType3dBar
With MSChart1.DataGrid
' Set Chart parameters using methods.
rowLabelCount = 2
columnLabelCount = 2
rowCount = 6
columnCount = 6
.SetSize rowLabelCount, columnLabelCount, _
rowCount, columnCount
' Randomly fill in the data.
.RandomDataFill
' Then assign labels to second Level.
labelIndex = 2
columnCount = 1
.ColumnLabel(columnCount, labelIndex) = "Product 1"
columnCount = 4
.ColumnLabel(columnCount, labelIndex) = "Product 2"
rowCount = 1
.RowLabel(rowCount, labelIndex) = "1994"
rowCount = 4
.RowLabel(rowCount, labelIndex) = "1995"
End With
End Sub
Keywords: kbdocerr kbctrl KB201958