INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

on PowerPoint Presentation, Change the each Bar color of Excel Linked Graphs as per their value

on PowerPoint Presentation, Change the each Bar color of Excel Linked Graphs as per their value

on PowerPoint Presentation, Change the each Bar color of Excel Linked Graphs as per their value

(OP)
Hello Friends,

I'm new to this forum and this is my first post.

I need help of you guys to solve a headache.

Currently I'm working on a project which require to change the Bar colors as per values of Excel linked graphs.

The problem is when the values changed in Excel sheet, values change on PPT graph also but the color of Bar doesn't change.

There are several slides and on every slide there is only one graph. Please refer attached PowerPoint Presentation

I have found one code on your forum, however as I'm new to PowerPoint VBA, not able to convert as per my use, however make some changes though but I stuck where need to set Chart:

Sub atest()
Dim sl As Slide, sh As Shape, ch As Chart, s As Series

For Each sl In ActivePresentation.Slides
For Each sh In sl.Shape
If sh.Type = 3 Then
Set ch = sh.OLEFormat.Object 'here I stuck. Error Message "OLEFormat (unknown number) : Invalid Request. This property only applies to OLE Objects"
sh.Select
i = 1
For Each s In ch.SeriesCollection
Select Case i
Case 1
s.Interior.Color = RGB(0, 34, 76)
Case 2
s.Interior.Color = RGB(174, 188, 158)
Case 3
s.Interior.Color = RGB(111, 150, 201)
End Select
i = i + 1
Next
End If
Next
Next
End Sub

Please help as this is very urgent project and I am very much stuck into it.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close