by Yuening Dai (30 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 9th January 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Use Function Round in VB6
Private Sub cmdRound_Click()
'
Dim dblTest As Double
'
'
If IsNumeric(txtTest.Text) = False Then Exit Sub
'
dblTest = Val(txtTest.Text)
'
dblTest = Round(dblTest, 3)
'
txtTest.Text = Str(dblTest)
'
End Sub