MSChart control in VB 6

Please let me know if the below code is correct.  For some reason, the labels do not appear in the correct columns.  The "Test" label does not appear at all.  
With MSChart2
 
    .ColumnLabel = "Test"
    .Column = 1
    .Row = 1
    .Data = IIf(IsNull(numVar), 0, numVar)
   
    .ColumnLabel = "One"
    .Column = 2
    .Row = 1
    .Data = IIf(IsNull(numVar1), 0, numVar1)

Open in new window

Tony789Asked:
Who is Participating?
 
ee_rleeConnect With a Mentor Commented:
try to set column first before changing the label

With MSChart2
 
    .Column = 1
    .ColumnLabel = "Test"
    .Row = 1
    .Data = IIf(IsNull(numVar), 0, numVar)
   
    .Column = 2
    .ColumnLabel = "One"
    .Row = 1
    .Data = IIf(IsNull(numVar1), 0, numVar1)
0
All Courses

From novice to tech pro — start learning today.