V
Vesset
When I record the following code through macro recorder,
then the bubble chart comes out fine. However, when I then
try to rerun the same code then I get an error message:
Run-time error '1004'
Method 'ChartType' of object '_Chart' failed
Any advice on why the xlBubble as chart type is not
working?
Sub Macro2()
Charts.Add
ActiveChart.ChartType = xlBubble
ActiveChart.SetSourceData Source:=Sheets
("Sheet2").Range("A2:C6"), PlotBy:= _
xlColumns
ActiveChart.Location Where:=xlLocationAsObject,
Name:="Sheet2"
End Sub
then the bubble chart comes out fine. However, when I then
try to rerun the same code then I get an error message:
Run-time error '1004'
Method 'ChartType' of object '_Chart' failed
Any advice on why the xlBubble as chart type is not
working?
Sub Macro2()
Charts.Add
ActiveChart.ChartType = xlBubble
ActiveChart.SetSourceData Source:=Sheets
("Sheet2").Range("A2:C6"), PlotBy:= _
xlColumns
ActiveChart.Location Where:=xlLocationAsObject,
Name:="Sheet2"
End Sub