VBA code to set transparency of data marker in xl2007
Here is code and an example workbook on how to set transparency of data marker in xl2007. You can set the transparency by altering the colour property of both Forecolor and Backcolor without resorting to changing chart type.
Sub SetDataMarkerTransparency()
Dim chtTemp As Chart
Dim serTemp As Series
Set chtTemp = ActiveSheet.ChartObjects(1).Chart
Set serTemp = chtTemp.SeriesCollection(1)
With serTemp.Format.Fill
.Solid
.Visible = True
.BackColor.RGB = RGB(255, 0, 0)
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
End With
End Sub
Dim chtTemp As Chart
Dim serTemp As Series
Set chtTemp = ActiveSheet.ChartObjects(1).Chart
Set serTemp = chtTemp.SeriesCollection(1)
With serTemp.Format.Fill
.Solid
.Visible = True
.BackColor.RGB = RGB(255, 0, 0)
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0.5
End With
End Sub