## Posted By

Angelboy on 09/23/10

# Vl64 seperar modulo

/ Published in: Visual Basic

`Public Function vl64separar(datos As String, arreglo As Integer) As StringDim i As LongDim j As LongDim Encontro As StringDim cadena() As String j = -1For i = 1 To Len(datos) ReDim Preserve cadena(0 To Len(datos))  'Un digitoIf Asc(Mid(datos, i, 1)) >= 72 And Asc(Mid(datos, i, 1)) <= 79 ThenEncontro = Mid(datos, i, 1)j = j + 1cadena(j) = EncontroEnd If 'dos digitosIf Asc(Mid(datos, i, 1)) >= 80 And Asc(Mid(datos, i, 1)) <= 87 ThenEncontro = Mid(datos, i, 2)j = j + 1cadena(j) = Encontroi = i + 1End If 'tres digitosIf Asc(Mid(datos, i, 1)) >= 88 And Asc(Mid(datos, i, 1)) <= 95 ThenEncontro = Mid(datos, i, 3)j = j + 1cadena(j) = Encontroi = i + 2End If 'cuatro digitosIf Asc(Mid(datos, i, 1)) >= 96 And Asc(Mid(datos, i, 1)) <= 103 ThenEncontro = Mid(datos, i, 4)j = j + 1cadena(j) = Encontroi = i + 3End If 'cinco digitosIf Asc(Mid(datos, i, 1)) >= 104 And Asc(Mid(datos, i, 1)) <= 111 ThenEncontro = Mid(datos, i, 5)j = j + 1cadena(j) = Encontroi = i + 4End If 'seis digitosIf Asc(Mid(datos, i, 1)) >= 112 And Asc(Mid(datos, i, 1)) <= 119 ThenEncontro = Mid(datos, i, 6)j = j + 1cadena(j) = Encontroi = i + 5End If Next vl64separar = cadena(arreglo)End Function`