Materi Perkuliahan

Menentukna peertemuan 2 mobil yang berlawanan menggunakan VBA Powerpoint

Dipublikasikan pada : 29 Januari 2020.

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

id_IDIndonesian