Underc0de

Programación General => Visual Basic => Mensaje iniciado por: 79137913 en Mayo 27, 2013, 03:34:35 PM

Título: [FUNCION] Extraer numeros de cadenas ExtractNums7913
Publicado por: 79137913 en Mayo 27, 2013, 03:34:35 PM
HOLA!!!

Código (vb) [Seleccionar]
Private Function ExtractNums7913(expression As String) As String
    Dim a() As Byte
    Dim b() As Byte
    Dim ct As Long
        a = expression
        b = a
        For x = 0 To UBound(a) Step 2
            If a(x) < 58 Then
                If a(x) > 47 Then
                    b(ct + ct) = a(x)
                    ct = ct + 1
                End If
            End If
        Next
        ReDim Preserve b(ct + ct)
        ExtractNums7913 = b
End Function


GRACIAS POR LEER!!!