PowerPoint Creative
Log In or Register to participate in PPC!
PowerPoint Creative
Log In or Register to participate in PPC!

Go down
hheydinger
hheydinger
Aspiring PPT Creator
Aspiring PPT Creator
Posts : 10
Join date : 2021-07-08
Location : Florida

Animating PPT with VBA Empty Animating PPT with VBA

Wed Jul 14, 2021 12:03 pm
I'm trying to disappear a few text boxes so as to reveal what's underneath and can't get he Animation function to act.  I need a few pointers to get started.
johnr
johnr
Administrator
Administrator
Posts : 933
Join date : 2017-08-17
Location : UK
http://www.powerpointgames.uk

Animating PPT with VBA Empty Re: Animating PPT with VBA

Wed Jul 14, 2021 6:00 pm
I'm assuming you need to do this with VBA rather than triggers. Is this the case?
hheydinger
hheydinger
Aspiring PPT Creator
Aspiring PPT Creator
Posts : 10
Join date : 2021-07-08
Location : Florida

Animating PPT with VBA Empty Re: Animating PPT with VBA

Wed Jul 14, 2021 7:02 pm
Triggers won't suffice since I need to go back to that same slide again and again in the Jeopardy game I have.  What will work, I think,
is to send a covering object to the back, behind the object to be revealed. Then I just need another procedure to bring it back to the front when starting over at the beginning.  Am searching now for properties to Send to Back/Front.  It's a trial & error process to get what I want.
rusnakcreative
rusnakcreative
Administrator
Administrator
Posts : 631
Join date : 2017-08-16
https://www.rusnakcreative.com

Animating PPT with VBA Empty Re: Animating PPT with VBA

Wed Jul 14, 2021 10:10 pm
Hey hheydinger,

First off, a little late welcome to PowerPoint Creative! Glad you can join us, and hope you can pick up some new tips and tricks to creating some cool stuff in PowerPoint. Feel free to share your work in the forum!

Anyways, answering your question:
If you are just looking for a simple show and hide without any fancy fade in/outs, perhaps you shouldn't think animation. Use shapes(shapename).visible = False (or True) instead. All that does it toggles the visibility of that shape to hidden or visible, just as if you were clicking on the eyeball icon in the selection pane.
hheydinger
hheydinger
Aspiring PPT Creator
Aspiring PPT Creator
Posts : 10
Join date : 2021-07-08
Location : Florida

Animating PPT with VBA Empty Re: Animating PPT with VBA

Thu Jul 15, 2021 6:40 am
I tried .Visible True/False but it hasn't worked yet.  Something else strange is going on right now. Once I get that fixed maybe the Visible will work.
rusnakcreative
rusnakcreative
Administrator
Administrator
Posts : 631
Join date : 2017-08-16
https://www.rusnakcreative.com

Animating PPT with VBA Empty Re: Animating PPT with VBA

Thu Jul 15, 2021 7:23 am
hheydinger wrote:I tried .Visible True/False but it hasn't worked yet.  Something else strange is going on right now. Once I get that fixed maybe the Visible will work.

Did you make sure you were able to call out the specific shape you were wanting to hide? Maybe there's a typo somewhere in the line of code? I'd suggest start typing from the beginning and use the contextual drop down boxes to help you with the next part of your line after you type a "." If you don't see anything suggested, either you have a typo, or that part doesn't contain any methods or procedures and you're at the end of the line and then can try typing "=" and see if there are any pre-selected values you can apply. When you do .Visible, you should see 5 values, like msoTrue, msoFalse, etc. Thankfully just typing "True" or "False" still works, but you can also select one of the msoTrue values.

Example: I'm wanting to hide the shape named "Oval 3" on the slide in the first position of your deck. This is what I would use.

Code:
ActivePresentation.Slides(1).Shapes("Oval 3").Visible = False
hheydinger
hheydinger
Aspiring PPT Creator
Aspiring PPT Creator
Posts : 10
Join date : 2021-07-08
Location : Florida

Animating PPT with VBA Empty Re: Animating PPT with VBA

Fri Jul 16, 2021 5:28 pm
The Visible.True/False works now.  Whatever was hanging up before is gone now. ?!?!
Next problem  -- I have a sub to prompt for a single keystroke and then flash a stored player name on screen.  The keystroke is actually coming from a buzzer that works like a joystick button and I translae that to a single letter (Q,W,Z,X).  So each player with a buzzer gets attached to a different letter.  This works fine if I'm running he VBA in developer mode, but not when the pptm file is in presentation mode and the macro gets activated by an on-sllide action button  -- the prompt never appears and any keyboard input causes the slide show to end.
buttonText = Left(InputBox("Enter button letter", 0), 1)
rusnakcreative
rusnakcreative
Administrator
Administrator
Posts : 631
Join date : 2017-08-16
https://www.rusnakcreative.com

Animating PPT with VBA Empty Re: Animating PPT with VBA

Sat Jul 17, 2021 12:34 am
Sounds like you're wanting to build a buzzer system to see who rang in first? If you'd like, send me your file through a private message so I can take a look at your code and see if I can find and troubleshoot the issue. This sounds too complex to try to help fix over forum posts.
hheydinger
hheydinger
Aspiring PPT Creator
Aspiring PPT Creator
Posts : 10
Join date : 2021-07-08
Location : Florida

Animating PPT with VBA Empty Re: Animating PPT with VBA

Fri Jul 30, 2021 4:14 pm
I have another issue now with the Shape Visibility.  In Presentation Mode, I can click a Custom Action button to call a Reveal macro that makes a desired shape invisible, thus revealing what is underneath.  That works.  But if I step to another slide and then back to the first slide, the shape is visible again.  How do I make the shape "permanently" invisible (regardless of how I step thru the slide deck) until I intentionally change it with a Restore macro?
PPT Dev
PPT Dev
PPT Creator
PPT Creator
Posts : 81
Join date : 2020-07-09
Location : USA
https://www.youtube.com/channel/UCmHvRg60FMXwpwYV1TliCVw

Animating PPT with VBA Empty Re: Animating PPT with VBA

Sat Mar 05, 2022 9:26 pm
You can trigger an animation with VBA by using a number of functions, such as the sendkeys command in conjunction with animation triggers.

Alternatively, you can make what's called a "latching animation", which requires little-to-no VBA at all.

If you have Discord, DM me at Elijah2022#2870 and let's discuss.
Sponsored content

Animating PPT with VBA Empty Re: Animating PPT with VBA

Back to top
Permissions in this forum:
You cannot reply to topics in this forum