Excel 2010 Using Power Pivot and Chaging a Chart Name

Kurt

Well-known Member
Joined
Jul 23, 2002
Messages
1,652
I have the following code:

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?
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Watch MrExcel Video

Forum statistics

Threads
1,123,032
Messages
5,599,422
Members
414,309
Latest member
kliskiewitz

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
Top