Postingan

Menampilkan postingan dari Desember, 2018

TUGAS 2.6

Gambar
Private Sub Check1_Click() If Check1.Value = 1 Then Label1.FontBold = True Else Label1.FontBold = False End If End Sub Private Sub Check2_Click() If Check2.Value = 1 Then Label1.FontItalic = True Else Label.FontItalic = False End If End Sub Private Sub Check3_Click() If Check3.Value = 1 Then Label1.FontUnderline = True Else Label1.FontUnderline = False End If End Sub Private Sub Check4_Click() If Check4.Value = 1 Then Label1.FontStrikethru = True Else Label1.FontStrikethru = False End If End Sub Private Sub Command1_Click() End End Sub Private Sub Option1_Click() Label1.ForeColor = vbRed End Sub Private Sub Option2_Click() Label1.ForeColor = vbGreen End Sub Private Sub Option3_Click() Label1.ForeColor = vbBlue End Sub Private Sub Option4_Click() Label1.ForeColor = vbYellow End Sub

TUGAS 2.5

Gambar
Private Sub Check1_Click() Label3.FontBold = Check1.Value End Sub Private Sub Check2_Click() Label3.FontItalic = Check2.Value End Sub Private Sub Command1_Click() Label3.Caption = Text1.Text End Sub Private Sub Command2_Click() End End Sub Private Sub Option1_Click() Label3.ForeColor = vbBlue End Sub Private Sub Option2_Click() Label3.ForeColor = vbRed End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Label3 = Text1.Text End If End Sub

TUGAS 2.4

Gambar
Private Sub Command1_Click() Text4 = Val(Text1) + Val(Text2) - Val(Text3) Text5 = Val(Text4) * 0.1 Text6 = Val(Text4) - Val(Text5) End Sub Private Sub Command2_Click() Text1.SetFocus Text1 = "" Text2 = "" Text3 = "" Text4 = "" Text5 = "" Text6 = "" End Sub Private Sub Command3_Click() End End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text2.SetFocus End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text4 = Val(Text1) + Val(Text2) - Val(Text3) Text5 = Val(Text4) * 0.1 Text6 = Val(Text4) - Val(Text5) End If End Sub

TUGAS 2.3

Gambar
Private Sub Command1_Click() Text4 = Val(Text1) + Val(Text2) - Val(Text3) Text5 = Val(Text4) * 0.1 Text6 = Val(Text4) - Val(Text5) End Sub Private Sub Command2_Click() Text1.SetFocus Text1 = "" Text2 = "" Text3 = "" Text4 = "" Text5 = "" Text6 = "" End Sub Private Sub Command3_Click() End End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text2.SetFocus End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text3.SetFocus End If End Sub

TUGAS 2.2

Gambar
Private Sub Command1_Click() Text2 = Val(Text1) * 0.1 Text3 = Val(Text1) - Val(Text2) End Sub Private Sub Command2_Click() Text1.SetFocus Text1 = "" Text2 = "" Text3 = "" End Sub Private Sub Command3_Click() End End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text2 = Val(Text1) * 0.1 Text3 = Val(Text1) - Val(Text2) End If End Sub

TUGAS 2.1

Gambar
Private Sub Command1_Click() Text2 = Val(Text1) * 0.1 Text3 = Val(Text1) - Val(Text2) End Sub Private Sub Command2_Click() Text1.SetFocus Text1 = "" Text2 = "" Text3 = "" End Sub Private Sub Command3_Click() End End Sub