power point Help

k_v_deepu

New Member
Joined
Aug 25, 2008
Messages
32
Hi All,

I need some help in Powerpoint vba...
There are around 80 slides in the powerpoint and in each slide there is MSgraph object.
I need to change the Legend color in the graph.
Example: first legend is of Yellow color i need to change it to red
How can i do it using vba

Any help will be appreciated

Thanks in advance
Deepak
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Powerpoint is not a discussion item on this board. I suggest you turn on the macro recorder and go through the step of changing the background and changing from one slide to the next. Then stop the recorder and examine the code that was generated. Chances are you will figure it out from there.
 
Upvote 0
Not sure why this isn't the place to discuss powerpoint here, as the title of this part of the board is questions concerning programs other than Excel or Access

This will give you an idea of where to start... I use it to change the stcked bars borders and the data lables attributes of an MSGraph chart in PPT.
I'm sure there are legend attributes that you can alter.

Hope this helps point you in the right direction.

Code:
Set oGraph = ActivePresentation.Slides(1).Shapes("Object 4").OLEFormat.Object
 
   With oGraph.ColumnGroups(1).Border = False
   End With

  
  For I = 1 To 3
    With oGraph.SeriesCollection(I)
     .HasDataLabels = True
   With .DataLabels
        .Font.Size = 15.75
        .NumberFormat = "0.0"   'change this as needed
        
     End With
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

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