Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/03/2011, 10:00
m0rbid
 
Fecha de Ingreso: septiembre-2010
Mensajes: 21
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Seleccionar textbox de acuerdo a variable

Aver si te he entendido bien, mira lo que hice yo: Creo 6 Cajas de texto, Text1(1), (2), (3), hasta el 6 ¿se entiende?. Borra la (0).

Creo un CommandButton1 y el siguiente código:

Código:
Private Sub Command1_Click()
Dim i As Integer ' Variable
For i = 1 To 6
    If Text1(i).Text = i Then
        Text1(i).Text = "Hola"
    End If
Next i
End Sub
Entonces las Cajas de texto que tienen como Texto 1, 2, 3, 4, 5 o 6, su texto cambia a "Hola".

Saludos.