Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an animated excel file with a picture rolling from left to right of
the screen. The is done when I click on the picture. My first problem is that the picture rolls very fast and I want to reduce its speed, and the second problem is that I want this animation not when I click on the picture but when I open the file. I am using Excel 2007 and below is the code that I am using. Any help. Thanks. Code: Sub StartDemo1() On Error Resume Next Set OldCell = ActiveCell ActiveSheet.Shapes("Picture 1").Select For i = 0 To 360 Step 3 Selection.ShapeRange.IncrementRotation 15 Selection.ShapeRange.Left = Selection.ShapeRange.Left + 10 Selection.ShapeRange.Top = Selection.ShapeRange.Top - 0.1 DoEvents Next i For i = 360 To 0 Step -6 Selection.ShapeRange.IncrementRotation -15 Selection.ShapeRange.Left = Selection.ShapeRange.Left - 20 Selection.ShapeRange.Top = Selection.ShapeRange.Top + 0.1 DoEvents Next i Selection.ShapeRange.Top = 300 Selection.ShapeRange.Left = 42 OldCell.Select End Sub |