|
Private Sub Command1_Click()
MsgBox Round(12.3265, 2) End Sub Function Round(nValue As Double, nDigits As _ Integer) As Double Round = Int(nValue * (10 ^ nDigits) + _ 0.5) / (10 ^ nDigits) End Function 'Run the project by pressing F5. When the from has loaded click on 'the command button and 12.33 is returned. |