Creating piechart in excel using VBA

I am new to VB and trying to learn how to create a pie chart from specific values ​​in an Excel spreadsheet. I know how to make histograms, but I wonder if you guys know about online resources or tutorials for this.

thanks

+4
source share
1 answer

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 
+6
source

All Articles