Change Datalabel brightness thru VBA

Invisibleman

New Member
Joined
Sep 16, 2015
Messages
13
Dear all,

For the charts, I can change the brightness on the bars and such in VBA. But I am also try to set the brightness on the datalabels in VBA. But this I can't find.

I did try multiple options;
DataLabels.Interior.Brightness
DataLabels.ForeColor.Brightness
DataLabels.Brightness
DataLabels.Format.Brightness

But none seem to work. Can anybody tell me, how to set the brightness for the data labels in the VBA?

Thanks in advance,
Hans
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I hope this is what you need:

Without Brightness
1729417950789.png

Wtih Brightness
1729418006793.png

Try:
VBA Code:
Sub Chart_Brightness()
  Dim sh As Worksheet
  Dim co As ChartObject
'
  Set sh = ActiveSheet
  Set co = sh.ChartObjects("Chart1")
  
  With co.Chart.FullSeriesCollection(1).DataLabels.Format.Glow
    .Color.RGB = RGB(255, 255, 0)
    .Color.TintAndShade = 0
    .Color.Brightness = 0.00001
    .Transparency = 0.01
    .Radius = 10
  End With
End Sub

🤗
 
Upvote 0
Solution
I hope this is what you need:

Without Brightness

Wtih Brightness

Try:
VBA Code:
Sub Chart_Brightness()
  Dim sh As Worksheet
  Dim co As ChartObject
'
  Set sh = ActiveSheet
  Set co = sh.ChartObjects("Chart1")
 
  With co.Chart.FullSeriesCollection(1).DataLabels.Format.Glow
    .Color.RGB = RGB(255, 255, 0)
    .Color.TintAndShade = 0
    .Color.Brightness = 0.00001
    .Transparency = 0.01
    .Radius = 10
  End With
End Sub

🤗
Hello Dantemore,

Thanks, but it seems this only will change the border brithness. But I want to change the interior brightness, as it also can be done in the bar like;

Chart_Overview1.ChartObjects(puFN - 6).Chart.SeriesCollection(priFN).Format.Fill.ForeColor.Brightness

or isn't it possible to have the brightness set this way to the interior color?

regards,
Hans
 
Upvote 0
or isn't it possible to have the brightness set this way to the interior color?
You can show a picture before and after putting on the brightness interior
And it also explains how you manually set that brightness interior.

🧙‍♂️
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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