R
rtw120
Can anyone help with following statement error, I had tried VS8, S9, and VS10
all the same.
' YAxis
Dim axisY As Excel.Axis
axisY = xlChart.Axes(Excel.XlAxisType.xlValue, Excel.XlAxisGroup.xlPrimary)
axisY.HasTitle = False
axisY.HasMajorGridlines = True
axisY.HasMinorGridlines = False
axisY.MajorTickMark =
Microsoft.Office.Interop.Excel.XlTickMark.xlTickMarkInside
axisY.MinorTickMark = Microsoft.Office.Interop.Excel.XlTickMark.xlTickMarkNone
axisY.TickLabelPosition =
Microsoft.Office.Interop.Excel.XlTickLabelPosition.xlTickLabelPositionNextToAxis
axisY.Border.Weight = Excel.XlBorderWeight.xlHairline
axisY.Border.LineStyle = Excel.XlLineStyle.xlLineStyleNone
axisY.CrossesAt = 1
axisY.TickLabelSpacing = 1
axisY.TickMarkSpacing = 1
axisY.AxisBetweenCategories = True
axisY.ReversePlotOrder = False
' Series
Dim series1 As Excel.Series = xlChart.SeriesCollection(1)
Dim xlChartGroups As Excel.ChartGroups = xlChart.ChartGroups()
Dim xlChartGroup As Excel.ChartGroup = xlChartGroups.Item(1)
xlChartGroup.Overlap = 100
xlChartGroup.GapWidth = 0
xlChartGroup.HasSeriesLines = False
xlChartGroup.SeriesLines.Border.LineStyle = Excel.XlLineStyle.xlLineStyleNone
xlChartGroup.SeriesLines.Border.Weight = Excel.XlBorderWeight.xlThin
series1.Shadow = False
series1.InvertIfNegative = False
series1.Format.Fill.TwoColorGradient
(Microsoft.Office.Core.MsoGradientStyle.msoGradientVertical, 2)
series1.Format.Fill.Visible = Microsoft.Office.Core.MsoTriState.msoTrue
series1.Format.Fill.ForeColor.SchemeColor = 3
series1.Format.Fill.BackColor.SchemeColor = 2
The issue is when I run it and error is I can not setup property in above
some statement, there are some get same error.
Thanks.
all the same.
' YAxis
Dim axisY As Excel.Axis
axisY = xlChart.Axes(Excel.XlAxisType.xlValue, Excel.XlAxisGroup.xlPrimary)
axisY.HasTitle = False
axisY.HasMajorGridlines = True
axisY.HasMinorGridlines = False
axisY.MajorTickMark =
Microsoft.Office.Interop.Excel.XlTickMark.xlTickMarkInside
axisY.MinorTickMark = Microsoft.Office.Interop.Excel.XlTickMark.xlTickMarkNone
axisY.TickLabelPosition =
Microsoft.Office.Interop.Excel.XlTickLabelPosition.xlTickLabelPositionNextToAxis
axisY.Border.Weight = Excel.XlBorderWeight.xlHairline
axisY.Border.LineStyle = Excel.XlLineStyle.xlLineStyleNone
axisY.CrossesAt = 1
axisY.TickLabelSpacing = 1
axisY.TickMarkSpacing = 1
axisY.AxisBetweenCategories = True
axisY.ReversePlotOrder = False
' Series
Dim series1 As Excel.Series = xlChart.SeriesCollection(1)
Dim xlChartGroups As Excel.ChartGroups = xlChart.ChartGroups()
Dim xlChartGroup As Excel.ChartGroup = xlChartGroups.Item(1)
xlChartGroup.Overlap = 100
xlChartGroup.GapWidth = 0
xlChartGroup.HasSeriesLines = False
xlChartGroup.SeriesLines.Border.LineStyle = Excel.XlLineStyle.xlLineStyleNone
xlChartGroup.SeriesLines.Border.Weight = Excel.XlBorderWeight.xlThin
series1.Shadow = False
series1.InvertIfNegative = False
series1.Format.Fill.TwoColorGradient
(Microsoft.Office.Core.MsoGradientStyle.msoGradientVertical, 2)
series1.Format.Fill.Visible = Microsoft.Office.Core.MsoTriState.msoTrue
series1.Format.Fill.ForeColor.SchemeColor = 3
series1.Format.Fill.BackColor.SchemeColor = 2
The issue is when I run it and error is I can not setup property in above
some statement, there are some get same error.
Thanks.