I can't figure this out! I NEED to!
I get multiple errors...
the first one is on line 2 type mismatch
xlLine is empty...how do I make vb know that this is the chart type...not a variable.
smae thing on line 4.
Thats as far as I get...
I already:
etc....Code:Dim O as object Set O = CreateObject("excel.application")
Code:O.Charts.Add 'This works... O.Activechart.ChartType = xlLine ' ERROR O.Activechart.SetSourceData Source:=O.Sheets("MarketSmart").Range("F1:G" & MScr), PlotBy:=xlColumns O.Activechart.Location Where:=xlLocationAsNewSheet, Name:="MS Chart" With Activechart .HasTitle = True .ChartTitle.Characters.Text = "MarketSmart" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date" .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Defects" End With O.HasDataTable = False
[b]
Help please......
[b/]




Reply With Quote