Tugas Mahasiswa

Mengembangkan animasi kecepatan mobol dengan Koding VBA for Powerpoint yang diketahui

Dipublikasikan pada : 7 Februari 2021.

Sub mulai()
Dim b As Integer
a = Timer
b = 59
c = 0
Do While Timer < a + b
ActivePresentation.Slides(1).Shapes(“kotak”).TextFrame.TextRange.Text = Int(Timer – a)
ActivePresentation.Slides(1).Shapes(“mobil1”).IncrementLeft ActivePresentation.Slides(1).Shapes(“kotak”).TextFrame.TextRange.Text
ActivePresentation.Slides(1).Shapes(“mobil2”).IncrementLeft -ActivePresentation.Slides(1).Shapes(“kotak”).TextFrame.TextRange.Text

DoEvents
Loop

End Sub
Sub awal()
ActivePresentation.Slides(1).Shapes(“kotak”).TextFrame.TextRange.Text = 0
End
End Sub

Sub tambah1()
ActivePresentation.Slides(1).Shapes(“kec1”).TextFrame.TextRange.Text = ActivePresentation.Slides(1).Shapes(“kec1”).TextFrame.TextRange.Text + 10
End Sub
Sub kurang1()
ActivePresentation.Slides(1).Shapes(“kec1”).TextFrame.TextRange.Text = ActivePresentation.Slides(1).Shapes(“kec1”).TextFrame.TextRange.Text – 10
End Sub
Sub tambah2()
ActivePresentation.Slides(1).Shapes(“kec2”).TextFrame.TextRange.Text = ActivePresentation.Slides(1).Shapes(“kec2”).TextFrame.TextRange.Text + 10
End Sub
Sub kurang2()
ActivePresentation.Slides(1).Shapes(“kec2”).TextFrame.TextRange.Text = ActivePresentation.Slides(1).Shapes(“kec2”).TextFrame.TextRange.Text – 10
End Sub