Solved

xlXYScatterSmooth

Posted on 2007-03-29
5
1,137 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:Aiysha
5 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 250 total points
ID: 18822474
if you use late binding, vb6 doesn't know any constant value. You need to define this on your module

i.e.
public Const xlXYScatterSmooth = 72
public Const xlLocationAsNewSheet = 1
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 250 total points
ID: 18822997
You will also need:
xlPrimary = 1
xlCategory = 1
xlValue = 2

HTH
Rory
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now