Bienvenido a la mayor comunidad de usuarios EXCEL

Regístrate gratis ahora para ver contenidos y descargas sin restricciones!

Regístrate gratis

Alguna Macro - Para cambiar Genero automaticamente segun el Nombre

Solución
Modo didactico
Código:
Private Sub textBoxNombre_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 32 Then
        If textBoxNombre.Value = "Pedro" Then
            textBoxGenero.Value = "Masculino"
        End If
    End If
End Sub


Modo optimizado

Código:
Private Sub textBoxNombre_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 32 And textBoxNombre.Value = "Pedro" Then textBoxGenero.Value = "Masculino"
End Sub
Modo didactico
Código:
Private Sub textBoxNombre_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 32 Then
        If textBoxNombre.Value = "Pedro" Then...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Volver
Arriba