Text Box in pps file

A

Aidan

I have a text box in a pps file where I need the user to enter text into it.
There is also a save and close button which prompts for a save when changes
are made to file. Can someone tell me how to prompt the user to enter their
identification into the text box before they can save and close the file.

Thanks, Aidan.
 
D

David M. Marcovitz

Adding or entering text during a show
http://www.pptfaq.com/FAQ00701.htm

That FAQ entry will give you options to allow for users to enter text
during a show. If you choose a VBA option, you can always add
ActivePresenation.Save to have the presentation automatically save.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
A

Aidan

David,
Thanks. I have no experience with VB but I just need the code to force an
entry in a Candidate Identification text box otherwise it won't allow the
file to close.

Thanks. Aidan
 
A

Aidan

The code I used is as follows but I want the usual prompt if any changes have
been mafde to the fil, ie Do you want to save the changes... Can anyone help
on this? At the moment the powerpoint slide show is just closing (with
changes saved) without a prompt.

Thanks,

Aidan.


Sub NextSlideifIDcomplete()

Dim CandidateIDmsg As Integer


If Slide3.TextBox1 = "" Then

CandidateIDmsg = MsgBox("Please Enter your Candidate ID", 0, "Test message")

ElseIf Slide3.TextBox1 <> "" Then

ActivePresentation.Save
ActivePresentation.Close


End If


End Sub
 
D

David M. Marcovitz

OK. The ActivePresentation.Save will automatically save it without
asking. Instead of that, you want:

ActivePresentation.Saved = False

That will make PowerPoint think that the file has changed, whether it has
or not, so, on close, it will prompt for the user to save.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
A

Aidan

Thanks for swift reply however I need the prompt to save and close the file
to appear once they enter their candidate ID and click on the Save and Close
text box which has the macro attached with code as below. At the moment it is
not doing this. Thanks.

Sub NextSlideifIDcomplete()

Dim CandidateIDmsg As Integer


If Slide3.TextBox1 = "" Then

CandidateIDmsg = MsgBox("Please Enter your Candidate ID", 0, "Test message")

ElseIf Slide3.TextBox1 <> "" Then


ActivePresentation.Saved = False



End If



' Macro recorded 17/10/2006 by brian
'


End Sub
 
D

David M. Marcovitz

From what I udnerstand, you want to close and make sure that it asks
whether you want to save. The ActivePresentation.Saved = False does the
second part. After that, you need to put back the
ActivePresentation.Close to do the first part (the actual closing).
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
A

Aidan

David,
I did that but it simply closes the file without a prompt. I need to see the
dialog box appearing that prompts for a save.
 
D

David M. Marcovitz

Aha. Now I see. It seems that all the VBA code that quits a presentation
(Application.Quit, ActivePresentation.Close,
ActivePresentation.SlideShowWindow.View.Exit) ignores the
ActivePresenation.Saved value and never asks if you want to save. Sorry,
I'm out of ideas. Perhaps someone else can solve this one.
--David

David,
I did that but it simply closes the file without a prompt. I need to
see the dialog box appearing that prompts for a save.



--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
A

Aidan

Thanks to everybody. Steve I don't use VB. The code I got was from a friend.
I'd appreciate the code that prompts for a save. Thanks, Aidan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top