Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/04/2008, 05:09
occam25
 
Fecha de Ingreso: marzo-2007
Mensajes: 58
Antigüedad: 18 años, 2 meses
Puntos: 0
Re: Ampliar array para server TCP

He hecho un ejemplo muy simple y funciona bien, lo pongo por si a alguien le puede servir. A seguir bien!

Código:
Option Explicit

Dim a(), b(), c() As Integer

Private Sub Command1_Click()

     Dim i, tamaño, j As Integer
     tamaño = UBound(a)
     j = 0
    ReDim Preserve a(UBound(a) + UBound(b))

    For i = tamaño + 1 To UBound(a)
        a(i) = b(j)
        j = j + 1
    Next
End Sub

Private Sub Form_Load()

    Dim i As Integer

    ReDim Preserve a(205)
    ReDim Preserve b(199)

    For i = 0 To 205
        a(i) = i + 1
    Next

    For i = 206 To 405
        b(i - 206) = i + 1
    Next

End Sub