Password to next slide or custom show
:help
Hi all, I have received loads of help with vba for excel from this site, hope to get some help for powerpoint
I have been tasked with providing a solution for the following problem:
I have a powerpoint show used for training and is broken into different levels using custom shows.
We want the users to enter a password before they can access the next slide or custom show
I have the following code linked to a simple user form which has a text box for input and an OK button
How do I use vba to decide either which slide to go to or which custom show to run?
Code:
Private Sub cmdOK_Click()
Dim pWord As String
pWord = txtWord.Value
If pWord = "test" Then
'goto slide 2
ActivePresentation.SlideShowWindow.View.GotoSlide (Slide2) 'does not work
Unload Me
Else
MsgBox "The password is incorrect", vbCritical
txtWord.Value = ""
txtWord.SetFocus
End If
End Sub
Thanks in advance : pray2: