#  Other Applications & Softwares  > PowerPoint Formatting & General >  > [SOLVED] VBA? Making a Master Slide Object Appear on All Subsequent Slides Once Clicked

## AliGW

Not sure how many people here are into PowerPoint, but I suspect this might require VBA and I have no idea how to do this myself!

I have a master slide. On the master slide I have a pale blue oval (not the title slide, but all subsequent slides). When it is clicked, a red cross appears over it. 

What I want is this: let's say that the object is clicked when the user progresses to slide 3 of the presentation. How can I have the red cross appear automatically on all subsequent slides? In other words, once it has been clicked, the cross remains visible for the rest of the presentation.

The objective is to create a quiz in which the player gets lifelines (like in Who Wants to Be a Millionaire).

Hope this is clear! Sample file attached.

NB: I have changed the file extension from .pptx to .zip - this forum apparently does not accept either .pptx or .ppt as valid file formats! I hadn't realised.

----------


## Andy Pope

Try this code.




```
Please Login or Register  to view this content.
```


I have replaced the rotated plus with a multiple sign. I have no reason why 1 works and the other does not.
I added question number so you can see the slide progression and that the cross remains.

Note the zip file is now a pptm

----------


## AliGW

Thanks very much, Andy - I'll take a look.

----------


## AliGW

Yes, that works as I'd envisaged - thanks! Now to see if I can apply the code to the real workbook.

----------


## AliGW

Mmm. I have no idea which custom master slide this is or how to find out, but it's not working in my real workbook (which I can't share). There are other animations, of course, and these may be interfering.

And now when I run your slideshow again, the cross is just appearing from the outset.

Never mind - I can live without it.

Thanks again for your help  :Smilie:

----------


## AliGW

Out of curiosity, I am still fiddling around with this. I'm curious to understand the logic of the code you gave (and I have been looking online, but just can't quite piece it together from what I've found).

Firstly, this:




```
Please Login or Register  to view this content.
```


How would I know that I needed the (2) after custom layouts? What does it denote? And what does the DoEvents line do?

And then this:




```
Please Login or Register  to view this content.
```


Does this simply prevent the cross from appearing on the opening slide? If so, how would I also stop it from appearing on the final slide?

All this is for interest, because the code is not working reliably, even in the sample you provided: sometimes it works, sometimes it doesn't. If I have the workbook open for a while, and then try it, it seems OK, but it won't work immediately I open the workbook. What should I be looking for to work out why?

Sorry for the questions: I've dabbled a bit with VBA in Excel, but not enough to have any real command of it. This is the first time in PowerPoint for me.

Thank you for any insights.  :Smilie:

----------


## Andy Pope

To determine the index needed open Slide Master view, then count the sub slides (custom layouts). In your test example it is the second slide.

The OnSlideShowPageChange routine catches the event raised when moving slides when in slideshowmode. It checks if this is the first slide and if it is makes the cross invisible.

The 2 lines controlling visibility of the cross may be confusing. When I tested with the original rotated Plus sign it did not work. So I replaced the shape with the Multiple sign.

The final part, which I don't think I mentioned, is the assignment of the DisableLifeLine macro as an action to the oval shape.

----------


## AliGW

It's very odd: I can't actually get your sample to work any longer, and I haven't changed anything in it. 





> The final part, which I don't think I mentioned, is the assignment of the DisableLifeLine macro as an action to the oval shape.



Forgive my ignorance, but how would one do this?

----------


## AliGW

OK - so I am making progress here in that I have successfully made the cross disappear. In place of the oval I want to use an image that has been cut and pasted onto the master slide and then assign the action to this. I have dissected your sample file and cannot for the life of me find how or where you have applied an action to the oval - seems like black magic at the moment!

If you can just guide me on this, then I think I might have cracked it.  :Smilie:

----------


## jeffreybrown

Hi Ali,

Go into the slide master.  Click on the oval shape and on the Ribbon >> Insert >> Links >> Action

You will see half way down, Run macro and the title of the macro in the drop down box.

Does this help?

----------


## AliGW

Yes, I have just this minute realised this!!! I've now assigned the action to my image and it's all working perfectly - thank you! By working through this with a bit of trail and error and yours and Andy's guidance, I've learnt a lot. I have now got two lifelines working independently of each other. Really chuffed!!!  :Smilie: 

Thanks again.

----------


## jeffreybrown

Good to hear it may have helped Ali and you're welcome.  :Smilie:

----------


## AliGW

It did. I've been creating a _Who Wants to Be a Millionaire_ type quiz for use at school and just started obsessing about making it as easy as possible for anyone to use. I've built in all the ambient sounds used on the TV show, so I've learnt a lot about animations and sounds, too. Quite proud of myself! It doesn't take much ...  :Wink: 

Thanks again to you and to Andy.

----------

