Tools Macro Record New Macro creates this code, which you can then customize to suit your specific needs:
Charts.Add ActiveChart.ChartType = xlPie ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:A4"), PlotBy:= _ xlColumns ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1" ActiveChart.HasTitle = False
source share