Hidden Input Box Macro

J

John Michl

I have a Family Feud-like slide that I created. Currently you click on
a text box and it flips, dings and shows the answer. Click to the side
of a text box and it triggers a X and buzzer. Works fine as designed
but I'd like to improve it.

Since I have to click the appropriate area, participants can tell
before the animation kicks in if they got the right answer or not. I'd
like to somehow trigger the event without people seeing it.

I was thinking something like a macro tied to a keystroke combination,
that props for input but without showing it on the screen. I could
have my text box shapes named Answer1 through Answer5. If the input is
1 to 5 the appropriate text box would be triggered. If anything else
the big red X would appear.

Using VBA, how would I
1) accept input from the keyboard without showing it on the screen
2) trigger the animation proper animation sequence?

PPT 2003.

Thanks.

- John
 
J

John Michl

Thanks, Bill

Didn't see the functionality I'm looking for in your example. In fact,
what I built is similar to your example. Currently I have to click on
the correct answer or on the X spot to make those events happen.

What I want to do is enter a 1 on the keypad to make the 1st answer
display, 2 for the 2nd answer, etc. and say, 9 to make the X display
and 0 to stop the game. I can do this fairly easily using the Input
Box statement in VBA but I don't want people to see the input box or
the number I type in.

Any ideas?

- John
 
J

John Michl

Ended up being a little easier than I thought. I set the position for
the input box to be -10000 by -10000 so it doesn't show up on the
screen. Now I just need to figure out how to fire the animation
sequences. Here's the code I have so far for anyone interested.

Sub FeudAnswer()

Dim sAns
sAns = InputBox("Enter 1 to Start the Feud!")

StartAgain:
sAns = InputBox("Enter Answer", , , -10000, -10000)

Select Case sAns
Case 1
MsgBox "Case of 1"
Case 2
MsgBox "Case of 2"
Case 3
MsgBox "Case of 3"
Case 4
MsgBox "Case of 4"
Case 5
MsgBox "Case of 5"
Case 9
MsgBox "Case of 9"
Case 0
MsgBox "Case of 0"
Case Else
MsgBox "Operator Error. Try again."
End Select

If sAns <> 0 Then GoTo StartAgain
MsgBox "Thank you for playing the Feud"

End Sub
 
D

David M. Marcovitz

This seems to work for me:

Sub HiddenInput()
answer = InputBox("", , , -2500, -2500)
MsgBox answer
End Sub

It puts the InputBox way off the screen.

--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.loyola.edu/education/PowerfulPowerPoint/
 
D

David M. Marcovitz

I love when people figure out their own answers. I just posted the same
answer, but you figured it out first.
--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.loyola.edu/education/PowerfulPowerPoint/
 
J

John Michl

Thanks, David

Looks like that was the easy part. I've been searching the newsgroups
for tips on applying the animation but with limited luck.

What code would I use (assuming I can) to start an animation sequence.
I already have a Custom Animation sequence set up so that when I click
the box stuff happens. Can a reference that some how in VBA or would I
need to write fresh code to make it happen.

If the later, is there a way to find out what the properties and
methods would be for the sequence already in place? (I tried recording
a macro while selecting animation settings but only the selection of
the object was recorded.)

- John
 

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