Private Function comprobarValor(texto As String) As Double
Dim c As String, cadena As String
For i = 0 To Len(Texto)
c = Mid$(texto, i, 1)
If (c > Asc(48)) And (c < 57) Then
cadena = cadena & c
End If
Next
comprobarValor = cdbl(cadena)
End Function