https://ikaoristmikpringsewu.wordpress.com/wp-admin/post.php?post=8&action=edit&message=6&postpost=v2
RUMUS BUKU DATA
Private Sub Command1_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
End Sub
Private Sub Command3_Click()
Unload Me
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.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
# rumus penjumlahan 2 bilangan #
Private Sub Command1_Click()
Dim a, b, c As Single
a = Text1.Text
b = Text2.Text
c = a * b
Text3.Text = c
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub
Private Sub Command3_Click()
Unload Me
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
Dim a, b, c As Single
a = Text1.Text
b = Text2.Text
c = a * b
Text3.Text = c
End If
End Sub
RUMUS KALKULATOR
Private Sub Command1_Click()
Text9.Text = Val(Text1.Text) + Val(Text2.Text)
Text10.Text = Val(Text3.Text) * Val(Text4.Text)
Text11.Text = Val(Text5.Text) / Val(Text6.Text)
Text12.Text = Val(Text7.Text) – Val(Text8.Text)
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text10.Text = “”
Text6.Text = “”
Text2.Text = “”
Text3.Text = “”
Text9.Text = “”
Text5.Text = “”
Text4.Text = “”
Text7.Text = “”
Text8.Text = “”
Text11.Text = “”
Text12.Text = “”
End Sub
Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text10.Text = “”
Text6.Text = “”
Text2.Text = “”
Text3.Text = “”
Text9.Text = “”
Text5.Text = “”
Text4.Text = “”
Text7.Text = “”
Text8.Text = “”
Text11.Text = “”
Text12.Text = “”
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Text1_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text3.Text
b = Text4.Text
c = Val(Text3.Text) * Val(Text4.Text)
Text10.Text = c
Text5.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text1.Text
b = Text2.Text
c = Val(Text1.Text) + Val(Text2.Text)
Text9.Text = c
Text3.SetFocus
End If
End Sub
Private Sub Text5_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text5.Text
b = Text6.Text
c = Val(Text5.Text) / Val(Text6.Text)
Text11.Text = c
Text7.SetFocus
End If
End Sub
Private Sub Text7_keypress(keyascii As Integer)
If keyascii = 13 Then
Text8.SetFocus
End If
End Sub
Private Sub Text8_keypress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text7.Text
b = Text8.Text
c = Val(Text7.Text) – Val(Text8.Text)
Text12.Text = c
Text1.SetFocus
End If
End Sub
RUMUS DISCOUNT
Private Sub Command1_Click()
Dim A, B, C As Single
A = Text1.Text
B = Text2.Text
C = A * 0.1
Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim A, B, C As Single
A = Text1.Text
B = Text2.Text
Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End If
End Sub