Perulangan : Do While ... Loop Do Until ... Loop Do .... Loop Until
Intinya ada Do ada Loop seperti ada For ada Next Kid. On Sun, Jun 20, 2010 at 9:15 PM, ~sHeRaV~ <[email protected]> wrote: > > > ane baru join nih.. > numpang tnya.. > > Dim PauseTime, Start, Finish, TotalTime > Private Sub memulai() > If (MsgBox("Press Yes untuk memulai", 4)) = vbYes Then > PauseTime = 3 ' Set duration. > Start = Timer ' Set start time. > Do While Timer < Start + PauseTime > DoEvents ' Yield to other processes. > Image1.Left = Image1.Left + Rnd() * 100 > Image2.Left = Image2.Left + Rnd() * 100 > Image3.Left = Image3.Left + Rnd() * 100 > Finish = Timer ' Set end time. > TotalTime = Finish - Start ' Calculate total time. > MsgBox "Paused for " & TotalTime & " seconds" > Else > End > End If > End Sub > > it codingan ane, > logika yg mw ane jalanin tuh gni: > ketika d tekan tombol yes maka akan memulai hitungan sampai 3 detik... > dalam 3 detik itu, gambar 1,2,dan 3 akan bergerak secara random kearah > kiri... > kemudian finish dan selesai...jika tidak ditekan yes maka tidak ada event > yang terjadi.. > > pertanyaannya: > 1. tidak mw jalan, dan debug d image'a.. > 2. klo saya ganti do while timerny bkal ad message box yg berkata ELSE > WITHOUT IF..padahal da jelas ada if d awal..(ap sy salah memasukan coding)?? > > mohon di bantu.. > > >

