I have the following code:
I have created a chart using PowerPivot which is a really neat add in for Excel from Microsoft which allows you to create charts very easily.
I have 3 buttons on my slicer Personal, Premier and Professional. How can you modify this macro to change the chart title when you click on one of the slider buttons?
Code:
ActiveWorkbook.SlicerCaches("Slicer_ServiceClusterName"). _
VisibleSlicerItemsList = Array( _
"[Engagement-Efficiency].[ServiceClusterName].&[Personal]")
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartTitle.Select
ActiveChart.ChartTitle.Text = "Total Labor Personal Cluster" & Chr(13) & "5/11 - 8/10"
Selection.Format.TextFrame2.TextRange.Characters.Text = _
"Total Labor Personal Cluster" & Chr(13) & "5/11 - 8/10"
With Selection.Format.TextFrame2.TextRange.Characters(1, 29).ParagraphFormat
.TextDirection = msoTextDirectionLeftToRight
.Alignment = msoAlignCenter
End With
With Selection.Format.TextFrame2.TextRange.Characters(1, 20).Font
.BaselineOffset = 0
.Bold = msoTrue
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(0, 0, 0)
.Fill.Transparency = 0
.Fill.Solid
.Size = 18
.Italic = msoFalse
.Kerning = 12
.Name = "+mn-lt"
.UnderlineStyle = msoNoUnderline
.Strike = msoNoStrike
End With
I have created a chart using PowerPivot which is a really neat add in for Excel from Microsoft which allows you to create charts very easily.
I have 3 buttons on my slicer Personal, Premier and Professional. How can you modify this macro to change the chart title when you click on one of the slider buttons?