Trying to create a SIMPLE VB macro with Powerpoint

im2bz2p345

Board Regular
Joined
Mar 31, 2008
Messages
229
Hello all,

I am trying to formulate a VB macro to use in Powerpower on 4 buttons.

Below is my code
Code:
Sub Wrong()
MsgBox "Incorrect"
End Sub
Sub Right()
MsgBox "Correct"
SlideShowWindows(1).View.Next
End Sub
Sub RightLast()
MsgBox "Congratulations"
End Sub

The weird thing is, when I click on a button that has the incorrect answer, the macro pops up a blank dialog box.

When I select the correct answer button, a blank message box appears, but I do move to the next slide. So I know that this portion of the code is working: SlideShowWindows(1).View.Next


I need the message dialog box to say "Incorrect" or "Correct" when selecting the appropriate buttons on my powerpoint slide. I hope this is making sense, if not - just ask and I'll clarify.

Thanks for any help in advance!

~ Im2bz2p345 :)
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
*bump*

Any ideas people?

Trying to figure out why my code is giving me a blank dialog box instead of saying "Incorrect," "Correct," or "Congratulations" in the dialog box's textfield.

~ Im2bz2p345 :)
 
Upvote 0
Thanks Dom!

I just tried to implement this code again and all seems to be fine now. I am not sure what was causing the issue for me before.

Appreciate your help,

~ Im2bz2p345 :)
 
Upvote 0

Forum statistics

Threads
1,225,619
Messages
6,186,050
Members
453,335
Latest member
sfd039

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top