Looping: Nama: Dina Lestari Jurusan: Sistem Informasi NIM: 0409050066

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Nama : Dina Lestari

Jurusan : Sistem informasi

NIM : 0409050066

LOOPING
Listing Programnya adalah

Private Sub Command1_Click()

List1.Clear

For i = 1 To 100

List1.AddItem "Angka" & i

Next i
End Sub

Private Sub Command2_Click()

List1.Clear

For i = 100 To 1 Step -2

List1.AddItem "Angka" & i

Next i

End Sub

Private Sub Command3_Click()

List1.Clear

i = Asc("A")

Do Until i > Asc("Z")

List1.AddItem "Huruf" & Chr(i)

i=i+1

Loop

End Sub

Private Sub Command4_Click()

List1.Clear

i = Asc("Z")

Do While i > Asc("A")

List1.AddItem "Huruf" & Chr(i)

i=i-1

Loop

End Sub
Private Sub Command5_Click()

pesan = MsgBox(Perhatian, vbYesNo, "Apakah ingin keluar dari aplikasi ini?")

If pesan = vbYes Then

Unload Me

Else

List1.SetFocus

End If

End Sub

Private Sub Timer1_Timer()

Dim Pjg As Byte 'mendeklarasikan variable Pjg

Pjg = Len(Frmlooping.Caption)

capt1 = Right(Frmlooping.Caption, Pjg - 1)

capt2 = Left(Frmlooping.Caption, 1)

Frmlooping.Caption = capt1 + capt2

End Sub

You might also like