Please help me use VBA in PowerPoint to conditionally change the text color and fill color of a TextBox depending on the text it contains. I would like it to apply to all slides in the presentation, but only to TextBox objects named either tbPrevious or tbCurrent. I’ve attached a presentation to provide an example.
If the value in tbPrevious =
“R” then Fill = Hex: #FF0000
“Y” then Fill = Hex: #FFFF00
“G” then Fill = Hex: #00FF00
“B” then Fill = Hex: #0000FF and Text Color = Hex: #FFFFFF
Else Fill = Hex: #FFFFFF and Text Color = Hex: #000000
Here are the RGB values in case that is easier:
If the value in tbCurrent =
“R” then Fill = R: 255 G: 0 B: 0
“Y” then Fill = R: 255, G: 255, B: 0
“G” then Fill = R: 0, G: 255, B: 0
“B” then Fill = R: 0, G: 0, B: 255 and Text Color = R: 255, G: 255, B: 255
Else Fill = R: 255, G: 255, B: 255 and Text Color = R: 0, G: 0, B: 0
My coworker has a presentation with 276 slides in in that she updates every week, and around 100 of the slides have these two text boxes in them; so, this will save her a lot of time.
We are both using PowerPoint 2013, but the other guy that helps update the presentation is still using PowerPoint 2007.
Thanks in advance for your help,