Article ID: 186219
Article Last Modified on 10/10/2006
A1: 1
A2: 2
A3: 3
Sub AddChart()
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData _
Source:=Sheets("Sheet1").Range("A1:A3"),PlotBy:=xlColumns
'At this point, the active sheet is a Chart sheet with a column chart
'and ActiveSheet.Name will return "Chart1" as a string value.
ActiveChart.Location _
where:=xlLocationAsObject, Name:=ActiveSheet.Name
End Sub
Sub AddChart()
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData _
Source:=Sheets("Sheet1").Range("A1:A3"),PlotBy:=xlColumns
'At this point, the active sheet is a Chart sheet with a column chart
'and ActiveSheet.Name will return "Chart1" as a string value.
ActiveChart.Location _
where:=xlLocationAsObject, Name:=ActiveSheet.Name
End Sub
176476 OFF: Office Assistant Not Answering Visual Basic Questions
Additional query words: XL97 hang lockup freeze lock up
Keywords: kbbug kberrmsg kbpending kbprogramming KB186219