Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

xlXYScatterSmooth

plotting in vb 6.0.. I am having problems at the highlighted line in the code below..I am trying to convert vba code to vb 6.0 code.
is there a possibility of having problems later in the code?

For OutVar = 1 To TotalVariableCount
Set tempchart = FinalWBook.Charts.Add
tempchart.ChartType = xlXYScatterSmooth  <-----------------------------
tempchart.Location Where:=xlLocationAsNewSheet
tempchart.Name = ArraySelectionName(OutVar) & "-" & ArrayVariableName(OutVar)
tempchart.SeriesCollection.NewSeries
'ActiveChart.SeriesCollection.NewSeries
tempchart.SeriesCollection(1).XValues = "=ActualData!R2C1:R" & numberofcells & "C1"
tempchart.SeriesCollection(1).Values = "=ErrorfunctionAll!R" & (OutVar - 1) * ACTUALDATAPOINTS + 2 & "C1:R" & OutVar * ACTUALDATAPOINTS + 1 & "C1"
tempchart.SeriesCollection(1).Name = "=""Actual"""
tempchart.SeriesCollection(2).XValues = "=ActualData!R2C1:R" & numberofcells & "C1"
tempchart.SeriesCollection(2).Values = "=ErrorfunctionAll!R" & (OutVar - 1) * ACTUALDATAPOINTS + 2 & "C2:R" & OutVar * ACTUALDATAPOINTS + 1 & "C2"
tempchart.SeriesCollection(2).Name = "=""sim"""
With tempchart
        .HasTitle = True
        .ChartTitle.Characters.Text = ArraySelectionName(OutVar) & "-" & ArrayVariableName(OutVar)
        .Axes(xlCategory, xlPrimary).HasTitle = True
        .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "DAYS"
        .Tab.ColorIndex = 6
        .Axes(xlValue, xlPrimary).HasTitle = False
End With
Next OutVar
ASKER CERTIFIED SOLUTION
Avatar of EDDYKT
EDDYKT
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial