No os preocupeis. Ya está solucionado. Pongo la rutina por si a alguien el interesa:
Código:
' Deja el número con exactamente dos decimales
Private Function redondear(num As Double) As String
Dim num2 As Double
Dim strNum As String
Dim pos As Integer
Dim ln As Integer
num2 = Round(num, 2)
strNum = CStr(num2)
pos = InStr(strNum, ",")
ln = Len(strNum)
If pos = 0 Then
' No tiene coma --> 650 --> 650,00
redondear = strNum & ",00"
Else
' Tiene coma, miramos posición
If (ln - pos) = 1 Then
'estilo 650,2 --> 650,20
redondear = strNum & "0"
Else
' como está redondeado, tendrá dos decimales
' 650,23 --> OK
redondear = strNum
End If
End If
End Function
PEASO <a href="http://peaso.cjb.net" TARGET=_blank> (La Peich del Peaso)</a>