Turn off Data label Wrap vba

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
1,074
Office Version
  1. 2019
Platform
  1. Windows
I'm getting an error trying prevent text wrapping. Can someone help me resolve this issue.. thx

.SeriesCollection(1).DataLabels.WordWrap = msoFalse

VBA Code:
    With MyChart
        .SetSourceData Range("AA1:AB1")
        .SeriesCollection(1).Points(1).Format.Fill.ForeColor.RGB = RGB(49, 99, 148)
        .SeriesCollection(1).Points(2).Format.Fill.ForeColor.RGB = RGB(156, 49, 49)
        .ChartArea.Format.Fill.ForeColor.RGB = RGB(238, 238, 238)
        .ChartArea.Font.Color = RGB(255, 255, 255)
        .SetElement (msoElementDataLabelCenter)
        .ChartArea.Height = 95
        .ChartArea.Width = 100
        .ChartStyle = 26
        .Legend.Delete
        .SeriesCollection(1).DataLabels.WordWrap = msoFalse
    End With
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,215,644
Messages
6,125,993
Members
449,279
Latest member
Faraz5023

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