Article ID: 157940
Article Last Modified on 11/23/2006
C3: D3: Region 1 E3: Region 2 F3: Region 3
C4: Jan D4: 10 E4: 80 F4: 15
C5: Feb D5: 20 E5: 70 F5: 25
C6: Mar D6: 30 E6: 60 F6: 35
C7: Apr D7: 40 E7: 50 F7: 45
Sub CreateChart()
'Create a New Chart
Charts.Add
'Change the Chart Type to the desired type
ActiveChart.ChartType = xlColumnClustered
'Sets the Source Data to the Region of data starting with the
'top left corner C3. This line of code assumes that the
'region of cells is contiguous - without empty rows or columns.
ActiveChart.SetSourceData _
Source:=Sheets("Sheet1").Range("C3").CurrentRegion, _
PlotBy:=xlColumns
End Sub
176476 OFF97: Office Assistant Not Answering Visual Basic Questions
Additional query words: XL97
Keywords: kbdtacode kbprogramming KB157940