L
lopsided
Hi,
I am struggling with how to create a new graph in my spreadsheet and
place it as an object in an existing sheet. The code i have (mainly
salvaged from using the record function) fails on the highlighted line
below. Even replaying the recorded macros dont help as they still fail
at this line.
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Worksheets(1).Range("A1")
ActiveChart.Location Where:=xlLocationAsObject, _
Name:="GIFcontainer"
It seems that as soon as the first line is executed a new sheet is
automatically created containing the new graph hence messing up the
last line.
Does anyone know whats going on?
Many Thanks,
Tom
I am struggling with how to create a new graph in my spreadsheet and
place it as an object in an existing sheet. The code i have (mainly
salvaged from using the record function) fails on the highlighted line
below. Even replaying the recorded macros dont help as they still fail
at this line.
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Worksheets(1).Range("A1")
ActiveChart.Location Where:=xlLocationAsObject, _
Name:="GIFcontainer"
It seems that as soon as the first line is executed a new sheet is
automatically created containing the new graph hence messing up the
last line.
Does anyone know whats going on?
Many Thanks,
Tom