Sabtu, 06 Februari 2010

Membuat Animasi pada Excel

Private Declare Function timeGetTime Lib "winmm.dll" () As Long
Private Declare Function timeBeginPeriod Lib "winmm.dll" (ByVal uPeriod As Long) As Long
Private Declare Function timeEndPeriod Lib "winmm.dll" (ByVal uPeriod As Long) As Long

Private Sub CommandButton1_Click()
timeBeginPeriod 1
t = timeGetTime

For i = -90 To 90
'Shapes("Rectangle 3").IncrementRotation (3)
'Shapes("Rectangle 3").ThreeD.RotationX = i
'Shapes("Rectangle 3").ThreeD.RotationY = i
Shapes("AutoShape 6").Fill.ForeColor.SchemeColor = Int((80) * Rnd + 1)
Shapes("AutoShape 7").IncrementRotation (3)
Shapes("AutoShape 8").IncrementLeft (-3)
Shapes("WordArt 9").IncrementLeft (2)
Shapes("WordArt 9").Shadow.IncrementOffsetX (2)
Shapes("WordArt 17").IncrementLeft (3)




DoEvents
Next i
timeEndPeriod 1

End Sub

Tidak ada komentar: