Form1
Merah
Private Sub Command1_Click()
Label2.ForeColor = vbRed
End Sub
Hijau
Private Sub Command2_Click()
Label2.ForeColor = vbGreen
End Sub
Biru
Private Sub Command3_Click()
Label2.ForeColor = vbBlue
End Sub
Masuk
Private Sub Command4_Click()
If Text1.Text = "Tri" Then
MsgBox "Keyword di Terima", vbInformation, "Info"
Form1.Hide
Form2.Show
Else
MsgBox "Keyword di Tolak", vbCritical, "info"
End If
End Sub
Hapus
Private Sub Command5_Click()
Text1.Text = ""
Label2.Caption = ""
End Sub
OK
Private Sub Command6_Click()
Label2.Caption = Text1.Text
End Sub
Bold
Private Sub Option1_Click()
Label2.FontBold = True
Label2.FontItalic = False
Label2.FontUnderline = False
End Sub
Italic
Private Sub Option2_Click()
Label2.FontBold = False
Label2.FontItalic = True
Label2.FontUnderline = False
End Sub
Underline
Private Sub Option3_Click()
Label2.FontBold = False
Label2.FontItalic = False
Label2.FontUnderline = True
End Sub
Form2
Kembali
Private Sub Command1_Click()
Form2.Hide
Form1.Show
End Sub
Jika Text bernama Tri, maka akan menampilkan Info Keyword di Terima.
Kemudian akan menampilkan Form2.
Jika Text bukan bernama Tri, maka akan menampilkan Info Keyword di Tolak.