Sabtu, 06 Februari 2010

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("AutoShape 2").IncrementRotation (3)
Shapes("AutoShape 2").ThreeD.RotationX = i
Shapes("AutoShape 2").ThreeD.RotationY = i
DoEvents
Next i
timeEndPeriod 1

End Sub

Tidak ada komentar: