Ver Mensaje Individual
  #13 (permalink)  
Antiguo 29/03/2008, 11:29
Jassss
 
Fecha de Ingreso: marzo-2008
Mensajes: 8
Antigüedad: 17 años, 1 mes
Puntos: 0
Re: matrices de textbox

No me estoy explicando bien. Yo tengo un formulario con:

2 cuadros de texto y 1 boton

El codigo del boton es este:

Private Sub Command1_Click()
Dim tabla(2) As String
Dim tabla2(2) As String
Dim cont As Long
Dim cont2 As Long

For a = 0 To 2
tabla(0) = a
For b = 0 To 2
tabla(1) = b
For c = 0 To 2
tabla(2) = c
cont = cont + 1
cont2 = cont2 + 1
If cont = 30 Then
cont = 1
Me.Text1(0) = Me.Text1(0) + vbCrLf + vbCrLf
End If
For x = 0 To 2
If tabla(x) = 0 Then tabla2(x) = "1"
If tabla(x) = 1 Then tabla2(x) = "X"
If tabla(x) = 2 Then tabla2(x) = "2"
Text1(0).Text = Me.Text1(0) + tabla2(x)
Next
Me.Text1(0) = Me.Text1(0) + vbCrLf
Next
Next
Next
MsgBox (cont2)
End Sub

Cuando lo he pulsado, en uno de los cuadros sale esto:

111
11X
112
1X1
1XX
1X2
121
12X
122
X11
X1X
X12
XX1
XXX
XX2
X21
X2X
X22
211
21X
212
2X1
2XX
2X2
221
22X
222

¡¡¡¡HASTA AQUI TODO BIEN!!!!!

Que son todas las combinaciones posibles de 1,x,2. (3 partidos de la quiniela)

Entonces el problema es el siguiente:

Mi intencion es que en un cuadro muestre una parte de los datos (8 caracteres o 10 filas) y el otro cuadro muestre el resto de los datos.

Espero haberme explicado mejor.

Gracias por tu colaboración.