Formato textbox

Buenas tardes.
Espero que estés muy bien.
Mi pregunta es la siguiente:
En un formulario tengo 4 textbox
Como puedo hacer para bloquear el textbox2, 3 y 4
Es decir que no se pueda ingresar nada en ellos si no he ingresado la información en el textbox1... Y así sucesivamente
Muchas gracias...
Respuesta
1
Prueba esto en tu useform
Option Explicit
Private Sub TextBox1_Change()
    If Len(Trim(TextBox1)) = 0 Then
       TextBox2 = ""
       TextBox2.Enabled = False
       Else
       TextBox2.Enabled = True
    End If
End Sub
Private Sub TextBox2_Change()
    If Len(Trim(TextBox2)) = 0 Then
       TextBox3 = ""
       TextBox3.Enabled = False
       Else
       TextBox3.Enabled = True
    End If
End Sub
Private Sub TextBox3_Change()
    If Len(Trim(TextBox3)) = 0 Then
       TextBox4 = ""
       TextBox4.Enabled = False
       Else
       TextBox4.Enabled = True
    End If
End Sub
Private Sub UserForm_Activate()
TextBox2.Enabled = False
TextBox3.Enabled = False
TextBox4.Enabled = False
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas