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
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,213,496
Messages
6,113,993
Members
448,539
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top