Macros, (PowerPoint 2016)

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Macros, (PowerPoint 2016)

Post by steveh »

Morning all

I am trying to use PP to make a quiz, I have two Macro's right and wrong, on each slide I have a question and 4 possible answers which I have placed in action buttons, none of which do anything at the moment. I now want to assign the 'right macro to one of the answers that is correct and assign the 'wrong' macro to the other 3.

When I right click the action button though I do not have an assign option, I am sure that in previous versions of PP you could do that and I can't seem to find anything on the ribbons that can help me (I have the developers ribbon on show).

Cheers
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin

User avatar
HansV
Administrator
Posts: 69488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macros, (PowerPoint 2016)

Post by HansV »

Good afternoon,

Select an action button.
Activate the Insert tab of the ribbon.
In the Links group, click Action.
S2059.png
You do not have the required permissions to view the files attached to this post.
Regards,
Hans

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Re: Macros, (PowerPoint 2016)

Post by steveh »

Hi Hans

Not sure why I put morning?

Thanks for that, I do have another question if you could help please, now that I have done that on my test slide I have clicked the action buttons but nothing happens, looking at the code the message box part is highlighted in red writing but I can't seem to see where I have gone wrong

Code: Select all

Sub Wrong()

MsgBox (“Sorry, that’s not right. Please try again.”)

End Sub

Code: Select all

Sub Right()

MsgBox (“That’s right!”)

SlideShowWindows(1).View.Next

End Sub
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin

User avatar
HansV
Administrator
Posts: 69488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Macros, (PowerPoint 2016)

Post by HansV »

You should replace the curly quotes “ and ” with straight quotes ".
And it isn't necessary to enclose the text in parentheses:

Code: Select all

Sub Wrong()
    MsgBox "Sorry, that’s not right. Please try again."
End Sub

Sub Right()
    MsgBox "That’s right!"
    SlideShowWindows(1).View.Next
End Sub
Regards,
Hans

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Re: Macros, (PowerPoint 2016)

Post by steveh »

Hi Hans

thank you for this, pesky curly quotes, I got caught out with that before.

Cheers
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin