Why Does VBA Code Freeze Animation??

  • Thread starter Thread starter The Tman
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
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
 
Back
Top