Private Sub hasilbtn_Click()
Dim x, y
x = Text1.Text
y = x
y = (y - Int(y)) * 10
Text2.Text = IIf(y >= 5, Int(x) + 1, Int(x))
End Sub

Semoga membantu,
Handoko Luwanto (yuhana dot com)


----- Original Message ----- 
From: andreas sulistiyo 
To: ITCENTER@yahoogroups.com 
Sent: Saturday, November 10, 2007 8:10 PM
Subject: [ITCENTER] Pembulatan

hai para progrmmer vb.
gw bikin program tapi datanya ketemu 102.5
setelah gw bulatin ko hasilnya 102 ya? 
bukannya .5 udah pembulatan keatas, bukannya harusnya 103?
tapi klo hasilnya 102.51 hasilnya baru 103
misal gini deh:

Private Sub hasilbtn_Click()
dim x as integer
x=Text1.Text
Text2.Text=x
End Sub

isi di Text1.Text adalah =102.5
setelah gw klik di Text2 jadi 102. bukannya 103

Pertanyaan gw adalah gimana caranya biar jadi 103?
Mohon bantuannya, Terima Kasih
-Andre-




-- 
www.itcenter.or.id - Komunitas Teknologi Informasi Indonesia 
Gabung, Keluar, Mode Kirim : [EMAIL PROTECTED] 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ITCENTER/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ITCENTER/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Kirim email ke