Mas Sigit,
Seharusnya sih as Double
untuk mencegah error, text di txtdisc dan txtth harus di-validasi
sebagai numeric/angka.
kalau dimasukkan huruf, maka akan error..
contoh untuk validasi textbox
Private Sub txtdisc_Validate()
if not isNumeric(txtdisc.Text) then
MsgBox "Error, harus memasukkan angka", 48
Cancel = true
Exit Sub
End If
txtdisc.Text = format(txtdisc.text, "#,##0.00")
End Sub
evryone... sorry menghilang dr peredaran sejak yahoogroup di-bounce
dari gmail.
whew...
--- In [email protected], sigit budiarto <[EMAIL PROTECTED]>
wrote:
>
> Dear All,
> Aku mau tanya nih.Kalo aku bikin coding dengan pembagian pake
tipe data apa ya?? Masalahnya adalah setelah hasil keluar, lalu
muncul pesan runtime error 6 error flow.
> Cth :
> Total diskon (%) = disc / total harga * 100
>
> >> txttd = (txtdisc / txtth) *100
>
> nah untuk Dim txttd As ....??? Agar setelah hasilnya keluar tidak
muncul lagi error flow.
> Maklum baru belajar nih, Thanx's a lot B4
>
>
> ---------------------------------
> Kunjungi halaman depan Yahoo! Indonesia yang baru!
>
> [Non-text portions of this message have been removed]
>