I use VBA for charting, and can successfully create line, area, and bar plots for a nice dashboard. Problem: I tried using xlHistogram and xlBoxplot, which generate the same error:
Code:
With ActiveSheet.ChartObjects.Add(Left:=410, Width:=450, Top:=350, Height:=300).Chart
.ChartType = xlHistogram
The error is "Run-time error '5': Invalid procedure call or argument"
I can use many of the enumerated chart functions in VBA but these two just won't work. Any suggestions other than creating my own code for bins, etc.(which I can do, but I would rather use the xl function if possible)?
I have tried many of the xl enumerated charts, but without success for just these two functions. I want to use this with an array (not range) so that it is flexible with different datasets, so recording macros is not an option.