I am attempting to create a chart in excel from an access VB script
and am having some problems formatting some of the chart features.
Currently my code is :
and then attempted to port these commands over to my VB script but am not able
to figure out the syntax for incorporating these macro commands to my VB scrip without getting errors on each one...
What am I doing wrong?
Also, is there any tutorials out there on the chart options and fields that can be set?
Thanks
and am having some problems formatting some of the chart features.
Currently my code is :
I ran the following macro in excel to format the line in my chart and set the scaleSet objXLChart = .ChartObjects.Add(300, 0, 456, 300)
objXLChart.Activate
With objXLChart.Chart
.SeriesCollection.Add Source:=objXLBook.Sheets("Sheet1").Range("D1" & intLoop - 1)
.HasTitle = True
.ChartTitle.Text = Me.Nactteam & " Stage 3 FPY Data " & Format(Now(), "mm-yy")
.Legend.Position = xlLegendPositionBottom
End With
.Cells(1, 1).Activate
and then attempted to port these commands over to my VB script but am not able
to figure out the syntax for incorporating these macro commands to my VB scrip without getting errors on each one...
Sub Macro1()
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.ColorIndex = 5
.Weight = xlThick
.LineStyle = xlContinuous
End With
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScale = 100
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
End Sub
What am I doing wrong?
Also, is there any tutorials out there on the chart options and fields that can be set?
Thanks