Hi People,
Two things. First are there any tutorials out there on creating charts using VB that anyone has a link to? I'm starting to delve into this and its making my head hurt!!
Second, the code below creates a chart successfully (woohoo), however, how do I determine the chart size. It seems to be setting to a default on the target sheet? Also is there a list of all the 'ActiveChart' methods somewhere? The answer to this may answer the first question Thanks for any help.
' initializing parameters object
Set WS = Worksheets("Parameters")
' adding the chart
Charts.Add
ActiveChart.ChartType = xl3DBarClustered
ActiveChart.Location Where:=xlLocationAsObject, Name:="Chart"
' adding series
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "Fred1"
ActiveChart.SeriesCollection(1).Values = WS.Range(WS.Cells(3, 1), WS.Cells(12, 1))
ActiveChart.SeriesCollection(1).XValues = Array("Factor1", "Factor2", "Factor3", "Factor4", "Factor5", "Factor6", "Factor7", "Factor8", "Factor9", "Factor10")
Two things. First are there any tutorials out there on creating charts using VB that anyone has a link to? I'm starting to delve into this and its making my head hurt!!
Second, the code below creates a chart successfully (woohoo), however, how do I determine the chart size. It seems to be setting to a default on the target sheet? Also is there a list of all the 'ActiveChart' methods somewhere? The answer to this may answer the first question Thanks for any help.
' initializing parameters object
Set WS = Worksheets("Parameters")
' adding the chart
Charts.Add
ActiveChart.ChartType = xl3DBarClustered
ActiveChart.Location Where:=xlLocationAsObject, Name:="Chart"
' adding series
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "Fred1"
ActiveChart.SeriesCollection(1).Values = WS.Range(WS.Cells(3, 1), WS.Cells(12, 1))
ActiveChart.SeriesCollection(1).XValues = Array("Factor1", "Factor2", "Factor3", "Factor4", "Factor5", "Factor6", "Factor7", "Factor8", "Factor9", "Factor10")