FORM 1
Private Sub Command1_Click()
If Text1.Text = "rosiyana" And Text2.Text =
"56415276" Then
MsgBox "Log In Sukses", vbOKOnly, "Log in"
Unload Me
Form2.Show
Else
MsgBox "Nama dan Passwor Tidak Cocok "
End If
End Sub
FORM 2
Private Sub Command1_Click()
Unload Me
Form3.Show
End Sub
Private Sub Command2_Click()
Unload Me
Form4.Show
End Sub
Private Sub Command3_Click()
Unload Me
Form5.Show
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
FORM 3
Private Sub Command1_Click()
kode = Val(Text1)
Select Case kode
Case 1
Text2.Text = "Tas Chanel"
Text3.Text = "Rp. 1.500.000"
Case 2
Text2.Text = "Sepatu Adidas"
Text3.Text = "Rp. 1.300.000"
Case 3
Text2.Text = "Bedak Ultima"
Text3.Text = "Rp. 200.000"
Case 4
Text2.Text = "Liptin NYX"
Text3.Text = "Rp. 300.000"
Case Else
MsgBox "Barang yang anda inginkan tidak tersedia "
End Select
End Sub
Private Sub Command2_Click()
Unload Me
Form2.Show
End Sub
FORM 4
Private Sub Command1_Click()
x = Val(Text1)
List1.Clear
y = 1
Do
List1.AddItem y
y = y + 1
Loop Until y > x
End Sub
Private Sub Command2_Click()
Unload Me
Form2.Show
End Sub
FORM 5
Private Sub Command1_Click()
x = Val(Text1)
List1.Clear
k = 0
bil = 2
While k < x
prima = True
For pembagi = 2 To bil - 1
If bil Mod pembagi = 0 Then prima = False
Next pembagi
If prima Then
List1.AddItem bil
k = k + 1
End If
bil = bil + 1
Wend
End Sub
Private Sub Command2_Click()
Unload Me
Form2.Show
End Sub
Tidak ada komentar:
Posting Komentar