Tutorial : Basic Animation With VBA Excel

in #education7 years ago

Hi...
Meet me again ;)

Now I want show for you a tutorial how make basic animation with VBA Excel and I hope this can help you to expansion animation on VBA Excel.

  1. Insert a shape "Isosceles Triangle 1" and Rotate to right
    segitiga1.JPG
  2. Change a format theme color with your want and change name shape to "Play"
    segitiga2.JPG
    play.JPG
    3.Insert a object image
    insert.JPG
    4.Set background object to transparent color
    tembus.JPG
    5.Move image object to left and make a horizontal line for base and a vertical regtangle for wall
    alas.JPG
    6.Change name of shape object image to "Bola"
    bola1.JPG
    7.Insert a regtangle box change name to "Stop"
    stop.JPG
    8.Right click shape "Play" and select Assign Macro and click New
    baru.JPG
    9.Then enter the following code :

Sub Play_Click()
x = 0
Do
DoEvents
x = x + 2
Sheet1.Shapes("Bola").Left = x
Sheet1.Shapes("Bola").Rotation = x
Loop Until x = 522 Or s

Do
DoEvents
x = x - 0.5
Sheet1.Shapes("Bola").Left = x
Sheet1.Shapes("Bola").Rotation = x
Loop Until x = 500
End Sub

Sub Stop_Click()
s = 0
End
End Sub

Animation Finish and click shape "Play" to Run
end.JPG
END

Ok, thank you for visit @khaidir22 please vote me and see you.
;)

Coin Marketplace

STEEM 0.22
TRX 0.25
JST 0.039
BTC 95470.30
ETH 3313.37
USDT 1.00
SBD 3.15