I can't set the Histogram graphs property to manual...

bbhgroup

Board Regular
Joined
Dec 30, 2008
Messages
97
I still have trouble with the 'syntax' in excel. I've reviewed the object browser and the MS documentation, tried a number of combinations to no avail.
Quite simply, I want to be able to program the characteristics of a histogram and not have it change.
Using Win10 , MS OFFICE 365.

VBA Code:
   With ActiveSheet
        .Shapes.AddChart2(366, xlHistogram).Select
        iChartNum = .Shapes.Count ' get this chart's position
        ActiveChart.ChartTitle.Select
        Selection.Caption = "Histogram"
       [B] ActiveChart.ChartGroups(1).XlBinsType = xlBinsTypeManual ' this line errors "Object doesn't support this property or method."[/B]
        ActiveChart.ChartGroups(1).BinsOverflowEnabled = True
        ActiveChart.ChartGroups(1).BinsOverflowValue = 100
        ActiveChart.ChartGroups(1).BinsUnderflowEnabled = True
        ActiveChart.ChartGroups(1).BinsUnderflowValue = -100
        ActiveChart.ChartGroups(1).BinWidthValue = Evaluate("iHistogramBinSize")
        .Shapes(iChartNum).Left = iLeft
        .Shapes(iChartNum).Top = iTop + 300
        .Shapes(iChartNum).Placement = xlFreeFloating
        .Shapes(iChartNum).Locked = msoFalse
        ActiveChart.SetElement (msoElementLegendBottom)
    End With
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Watch MrExcel Video

Forum statistics

Threads
1,114,519
Messages
5,548,523
Members
410,844
Latest member
Juno49
Top