Thursday, March 13, 2014

Mencari Luas Pesergi Panjang

Private Sub CmdHapus_Click()
TxtPanjang = ""
TxtLebar = ""
Txthasil = ""
End Sub

Private Sub CmdHitung_Click()
Dim P, L, H As Integer
P = TxtPanjang
L = TxtLebar
H = P * L
Txthasil = H
End Sub

Private Sub CmdKeluar_Click()
DoCmd.Save
DoCmd.Close
End Sub

Thursday, March 6, 2014

Konversi Suhu




Private Sub CmdHapus_Click()
TxtCelcius = ""
TxtReamur = ""
TxtFahrenheit = ""
TxtKelvin = ""
TxtCelcius.SetFocus
End Sub

Private Sub CmdHitung_Click()
Dim C, R, F, K As Integer
C = TxtCelcius
R = (4 / 5) * C
F = (9 / 5) * C + 32
K = C + 273
TxtReamur = R
TxtFahrenheit = F
TxtKelvin = K
End Sub

Private Sub CmdKeluar_Click()
DoCmd.Save
DoCmd.Close
End Sub