Animation

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

Hi,

Is there a way so that you have a picture in the workbook

and when you press a button that picture moves across the screen and once it
hits the end it goes back to where it started(like move it small distances
fast so it looks like an animation?)
 
hey do you know any simplier examples that thing is awesome but wooo its so
confusing :(
 
Doug,

This is simple but it works

You would need to add a button and have it trigger this code

Sub MovePic()
' Object name is AutoShape 213 Change if needed
'
ActiveSheet.Shapes("AutoShape 213").Select
leftp = Selection.ShapeRange.Left
topp = Selection.ShapeRange.Top
For a = 1 To 15 ' change 15 to move further
With ActiveSheet.Shapes("AutoShape 213")
.IncrementLeft 30 'Change this to jump further
Application.Wait (Now + TimeValue("0:00:01"))
End With
Next a
' Resets position
Selection.ShapeRange.Left = leftp
Selection.ShapeRange.Top = topp

End Sub
 
That's perfect :D

Thanks!

Paul C said:
Doug,

This is simple but it works

You would need to add a button and have it trigger this code

Sub MovePic()
' Object name is AutoShape 213 Change if needed
'
ActiveSheet.Shapes("AutoShape 213").Select
leftp = Selection.ShapeRange.Left
topp = Selection.ShapeRange.Top
For a = 1 To 15 ' change 15 to move further
With ActiveSheet.Shapes("AutoShape 213")
.IncrementLeft 30 'Change this to jump further
Application.Wait (Now + TimeValue("0:00:01"))
End With
Next a
' Resets position
Selection.ShapeRange.Left = leftp
Selection.ShapeRange.Top = topp

End Sub
 

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

Similar Threads

PowerPoint Freeze animation 1
PowerPoint Super Stuck and Desperately Need Help 0
PowerPoint Animations in hyperlink slideshow 0
animation 11
Excel 2013 animation feature.... 2
PowerPoint Animations 0
Scrolling Picture and "Super Zoom" 1
PowerPoint playing a show with audio and animations- looping 1

Back
Top