PDA

View Full Version : Ppt 2013 Table - Click link to change cell color w/vba before going to linked slide



HisPet
12-30-2015, 03:05 PM
Hi everyone - I have a table in a PowerPoint 2013 presentation and each cell in the table contains a word with a hyperlink to another slide.



What I would like to do is, when I click a link in one of the table cells I want to change the background color of the cell that I clicked in and then go to the desired slide.

I know how to do the hyperlink but I cannot figure out how to select the cell that the hyperlink is in to change the background color of it.



I am very familiar with Excel VBA but this works quite different so am having difficulty getting to where I need to be.

Thanks so much in advance for any possible assistance!

John Wilson
01-01-2016, 12:47 PM
If you use a table there's no way to do this.

Neither the linked text or the table itself will trigger a macro and in any case it isn't possible (well not at all simple) to know which cell was clicked.

HisPet
01-03-2016, 04:10 PM
Thank you John. What if I put a shape or a text box inside each table cell. Could it work that way?

John Wilson
01-04-2016, 01:26 AM
You could but I would cut the table and Paste Special as an EMF and ungroup twice. This would give you something that looks like a table but is a collection of shapes and much easier to add code. In fact you probably could do it without code by adding a hyperlink to the SHAPE and an animation triggered by the shape to change the color. In both cases the colour change would happen after the hyperlink (or too fast to see until you return to the slide)

HisPet
01-04-2016, 06:01 AM
Oh wow that is great thank you so much.

John Wilson
01-04-2016, 07:38 AM
Please make sure you tell people working on this in other forums that you may have an answer.

HisPet
01-04-2016, 12:32 PM
Hi John - this is really great and I thank you so very much. I have a question though.

Can I make it change the color of the shape and keep it as the new color? It works wonderful but then goes back to the original color.

Thank you again and yes I will definitely let them know as I did post this question in another forum.

HisPet
01-04-2016, 12:36 PM
Actually I guess it does stay but doesn't show until I view the slide show. I just need to change the timing. Thank you John