ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Animation (https://www.excelbanter.com/excel-programming/422549-animation.html)

Doug

Animation
 
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?)


Andy Pope

Animation
 
Hi,

Here is one example
http://newtonexcelbach.wordpress.com...ng-in-excel-2/

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
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?)



Doug

Animation
 
hey do you know any simplier examples that thing is awesome but wooo its so
confusing :(

"Andy Pope" wrote:

Hi,

Here is one example
http://newtonexcelbach.wordpress.com...ng-in-excel-2/

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
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?)




Paul C

Animation
 
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





"Doug" wrote:

hey do you know any simplier examples that thing is awesome but wooo its so
confusing :(

"Andy Pope" wrote:

Hi,

Here is one example
http://newtonexcelbach.wordpress.com...ng-in-excel-2/

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
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?)




Doug

Animation
 
That's perfect :D

Thanks!

"Paul C" wrote:

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





"Doug" wrote:

hey do you know any simplier examples that thing is awesome but wooo its so
confusing :(

"Andy Pope" wrote:

Hi,

Here is one example
http://newtonexcelbach.wordpress.com...ng-in-excel-2/

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Doug" wrote in message
...
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?)





All times are GMT +1. The time now is 02:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com