Coba seperti dibawah ini, semoga tidak salah
Private Sub Command1_Click()
Dim x As String
If Len(Text1) > 3 Then
x = Len(Text1) - 3
Select Case Right(Text1, 3)
Case Is < 500
Text1 = Left(Text1, x) & "000"
Case Is <= 800
Text1 = Left(Text1, x) & "500"
Case Is >= 800
Text1 = Left(Text1, x - 1) & "1000"
End Select
End If
End Sub
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Gege Nugroho
Sent: 25 Agustus 2008 11:01
To: [email protected]; [EMAIL PROTECTED]
Subject: [Programmer-VB] Pembulatan
Guys...
Minta tolong lagih nih tentang VB
gwe punya kasusu pembulatan gaji begini :
<500=0
500-800=500
>800=1000
kasus ;
gaji : Rp. 1.009.480
yang dicetak : Rp. 1.009.000
gaji : Rp. 1.010.780
yang dicetak : Rp. 10.010.500
gaji : Rp. 1.000.955
yang dicetak : 1.001.000
Yang ditanyakan : Gimana sih logikanya?
trims yo guys...
Regards
Gege Nugroho
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.6.7/1631 - Release Date: 8/24/2008
12:15 PM