My post earlierOriginally posted by Mav505
NO sure if this is what you need, I dunno, I never have been great at this VB stuff
I put this on a form with a textbox for ur value, a label for the result and a button to do the crunching stuff:
Private Sub cmdRound_Click()
Dim MyNumber As Currency
Dim MyRoundedNumber As Currency
Dim TestValue As String
MyNumber = CCur(txtNumber.Text)
TestValue = CStr(MyNumber)
If Right(TestValue, 1) = "5" Then
MyNumber = MyNumber + 0.001
End If
MyRoundedNumber = Round(MyNumber, 2)
lblNumber.Caption = CStr(MyRoundedNumber)
End Sub
It seems to work, but try it out
Paul Moore![]()





Reply With Quote