C
Chris Watts
I have adapted some VBA code originally written by Bill Dilworrh (many
thanks to you Bill) that achieves pretty much what I need. The code is
below - and it works, even if rather slowly, in PPT 2007.
I wish to add some code so that I can interupt the scrolling with a mouse
click - and then restart it with another mouse click..
When I add the commented-out line
If MouseButtons.Left = True Then GoTo Pause
all that happens is that the code runs and moves the image up only one step
and then stops with no action from me. What am I doing wrong?
cheers
Chris
======================
Sub MoveUp(oShp As Shape)
'Determine the endpoint for the motion.
'In this case when the bottom edge of the image lines _
up with starting top of the image.
Endpoint = oShp.Top - oShp.Height
'Define amount to move image
Shift = 20
Offset = 475
While oShp.Top > Endpoint + Offset
'Move the picture a little upwards
oShp.Top = oShp.Top - Shift
'Re-render the screen
DoEvents
' If MouseButtons.Left = True Then GoTo Pause
'Loop back if not done
Wend
Pause:
End Sub
==========================
thanks to you Bill) that achieves pretty much what I need. The code is
below - and it works, even if rather slowly, in PPT 2007.
I wish to add some code so that I can interupt the scrolling with a mouse
click - and then restart it with another mouse click..
When I add the commented-out line
If MouseButtons.Left = True Then GoTo Pause
all that happens is that the code runs and moves the image up only one step
and then stops with no action from me. What am I doing wrong?
cheers
Chris
======================
Sub MoveUp(oShp As Shape)
'Determine the endpoint for the motion.
'In this case when the bottom edge of the image lines _
up with starting top of the image.
Endpoint = oShp.Top - oShp.Height
'Define amount to move image
Shift = 20
Offset = 475
While oShp.Top > Endpoint + Offset
'Move the picture a little upwards
oShp.Top = oShp.Top - Shift
'Re-render the screen
DoEvents
' If MouseButtons.Left = True Then GoTo Pause
'Loop back if not done
Wend
Pause:
End Sub
==========================