Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Excel Chart Programming

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.xlTickMa rkInside
axisY.MinorTickMark = Microsoft.Office.Interop.Excel.XlTickMark.xlTickMa rkNone
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.msoGradien tVertical, 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.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,346
Default Excel Chart Programming

Hi,

This question is not complete:

What lines of code are causing the errors and what is the exact error message?

What is "VS8, S9, and VS10"?

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"rtw120" wrote:

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.xlTickMa rkInside
axisY.MinorTickMark = Microsoft.Office.Interop.Excel.XlTickMark.xlTickMa rkNone
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.msoGradien tVertical, 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart with VB programming? Sri Charts and Charting in Excel 2 June 11th 09 02:20 PM
excel programming Wendy Elizabeth Charts and Charting in Excel 2 June 19th 07 04:21 AM
Help Programming an XY scatter Chart aj Charts and Charting in Excel 4 March 23rd 06 02:10 AM
Help programming new chart into a new worksheet aj Charts and Charting in Excel 0 March 22nd 06 03:45 PM
Help Programming an XY scatter Chart aj Charts and Charting in Excel 0 March 21st 06 10:15 PM


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"