PDA

View Full Version : Unwanted VBA Related Save Window



fdanbold
10-07-2010, 04:57 PM
First of all, I'm an absolute beginner with this so sorry if this is a stupid question but hopefully it'll be easy to solve!

For a psych study, I developed a powerpoint that incorporates text boxes, checkboxes and scrollbars that participants can fill out as the powerpoint runs in kiosk mode. I'm running it as a .pps in Medialab but as the powerpoint ends and the next section ends a window pops up asking if I would like to save the changes made to the powerpoint. I read on a Medialab forum that there is a way of using VBA to initialize all the elements I use so that this window doesn't pop up. I've tried a few things, but I can't get this pop up window to go away. Can anyone help? Thanks!

fdanbold
10-11-2010, 12:09 PM
I've noticed a lot of people have looked at this, so maybe some clarification will help get some responses. For example, I have one slide with 4 text box objects on it. Double clicking the text boxes pulls up the VBA where I see the following:
Private Sub TextBox1_Change()
End Sub
Private Sub TextBox2_Change()
End Sub
Private Sub TextBox3_Change()
End Sub
Private Sub TextBox4_Change()
End Sub

Through my rampant googling, the best suggestions I've seen are to 'initialize' the data and trick powerpoint into thinking it's saved (activepresentation.quit). Using the shotgun approach, here's what I had entered below. (Try not to laugh)
Private Sub TextBox1_Initialize()
ActivePresentation.Saved = True
ActivePresentation.Quit
End Sub
Private Sub TextBox2_Initialize()
ActivePresentation.Saved = True
ActivePresentation.Quit
End Sub
Private Sub TextBox3_Initialize()
ActivePresentation.Saved = True
ActivePresentation.Quit
End Sub
rivate Sub TextBox4_Initialize()
ActivePresentation.Saved = True
ActivePresentation.Quit
End Sub

As you can tell, I am a huge n00b at this. If you can help or at least refer me to some simple tutorials, I'd be extremely grateful!

John Wilson
10-11-2010, 09:53 PM
First of all be aware that you may have problems with macro security if you use vba. On many institution PCs vba is disabled

You need to run the 'I am already saved' code at the end of your show.

Press f11 to get to the vb editor
In this INSERT > Module
copy and paste in this code

Sub Iamsaved()
ActivePresentation.Saved = msoTrue
SlideShowWindows(1).View.Quit
End Sub
If you have a next slide or end show button on the last slide select it and change the action to RUN Macro

fdanbold
10-12-2010, 12:01 PM
You, my good sir, are a scholar and a gentleman. It took some tweaking but I finally got that pesky window to go away. If we ever meet in real life, I'm buying you a beer.

John Wilson
10-12-2010, 01:32 PM
Well just in case you are in San Diego I'm there next week!