Why Does VBA Code Freeze Animation??

T

The Tman

Why when i have a code in vba running, all animation either freezes, resets,
or doesnt work at all?
any help is GREATLY appreaciated
thanku
 
A

Austin Myers

You would have to tell us a bit about what the code is doing before we can
even venture a guess.



Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com
 
T

The Tman

ok sorry
this code is very simple, you click on a small circle and then click one of
many squares on the screen and using MoveHim and MoveTo the sircle appears on
that square
 
A

Austin Myers

Still kind of hard to guess without seeing the code. Have you ran the macro
in debug mode and stepped through it?


Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com
 
T

The Tman

here is the code so far
Dim movableChecker As shape
Sub MoveHim(theChecker As shape)
Set movableChecker = theChecker
End Sub

Sub MoveTo(theSquare As shape)
movableChecker.Top = theSquare.Top + 2
movableChecker.Left = theSquare.Left + 2
End Sub
 
D

David M. Marcovitz

I thought I recognized that code. It's from the More Tricks section of
my Web site. I have found that animation and VBA don't always play
nicely together. In many cases, hiding and showing objects will not work
properly when slides have animation. I haven't noticed the problem
before when objects are being moved, rather than hidden or shown, but I
generally avoid animation when manipulating objects with VBA.

What kind of animation are you running? What happens to it? Have you
tried going to the current slide as in:

ActivePresentation.SlideShowWindow.View.GotoSlide ###

replacing ### with the slide number where all this is happening.
Sometimes that fixes the problem. For good measure, since your working
with animations, you might actually use:

ActivePresentation.SlideShowWindow.View.GotoSlide ###, msoTrue

to reset the animation.

--David
 

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