hellow... thanks y udah kunjungin blog aq. disini aq posting beberapa tips tentang pemrograman visual basic, semoga bermanfaat
Rabu, 06 November 2013
Pembulatan Angka vb6
Private Function Genapkan(ByVal Number As Double, Optional Range = 100) As Double
Genapkan = (Round((Number / Range) + 0.49)) * Range
End Function
Private Sub Hitung()
On Error Resume Next
Dim v_sisa_harga As Double
Dim v_harga_angs As Double
Dim v_bunga As Double
Dim persen_bunga As Integer
persen_bunga = CInt(tbunga.Text)
v_sisa_harga = CDbl(tharga_jual.Text) - CDbl(tuangmuka.Text)
v_harga_angs = v_sisa_harga / CInt(tlamaangsuran.Text)
v_bunga = (persen_bunga / 100 * v_sisa_harga) ' / CInt(tlamaangsuran.Text)
tharga_angsuran = Genapkan(v_harga_angs + v_bunga)
ttotal_angsuran = CDbl(tharga_angsuran.Text) * CInt(tlamaangsuran.Text)
End Sub
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar
hay friend... sebelum exit, jgn lupa tinggalkan comment dulu ya...
kalau mau bertanya bisa tulis komentar atau email/fb ke: aranama@ymail.com
thank you...