Link to home
Start Free TrialLog in
Avatar of Chanel Gouws
Chanel GouwsFlag for South Africa

asked on

PowerPoint VBA Code

I currently have a table in PowerPoint and in my column named "Answers" i can either have "True" or "False"

I would like the cell to change to one colour when it's "True" and another if "False"

Can anyone help me out with code?

Thank you :)
Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)
Flag of United Kingdom of Great Britain and Northern Ireland image

This could be very simple or very complex depending on the event used to trigger the formatting change of the cell. If you want the user to generate the event e.g. via running a macro, clicking a shape in slide show mode  or clicking a custom button in the ribbon in design mode then it's easy. If you want it to be done automatically when the content changes, then that's much more complicated as it requires trapping PowerPoint events. Which do you want and do you plan to put the code within a single PowerPoint file e.g. use a .pptm file format or create an addin so that the code could be applied to multiple presentations?
Avatar of Chanel Gouws

ASKER

Hi Jamie,

Thank you for your reply - I think that it would be the less complex solution.

So, this slide will be populated from an external source with the words True/False depending on the answers users had given to a poll.

Once this pulls through into PowerPoint, I can then have the PP user run the macro that will then fill the "True" cells with, say, green and the "False" slides with, say, red.

Is this the less complicated solution..?
Yes - creating a demo for you now - give me a few minutes...
Thank you so much, I really appreciate it :)
ASKER CERTIFIED SOLUTION
Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One last comment. It would be good if you could update your question title from "PowerPoint VBA Code" to allow other t find it easier. Maybe "PowerPoint VBA Code to format table cell fill colours".
Thank you so much Jamie, I really appreciate your help! Will change the title as soon as I figure out how :)

Have a lovely weekend!