Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

EJECUTAR MACRO EN TEXTBOX CON CONDICION

publicado

Hola Estimados

Hay alguna macro que se aplique a un textbox (sin tener boton), que al tener una condición se ejecute?, se trata de lo siguiente, tengo un textbox1 que al tener las descripciones de:

MADERA

CARTON

PAPEL

sea invisible o inactivo el textbox2

y si es ACERO el textbox sea visible o activo

Agradecere de su apoyo

Slds.

FELIX

 

 

 

textbox condicionado.xlsm

Featured Replies

publicado

Felix

Prueba asi

Private Sub TextBox1_Change()
On Error Resume Next
    vt = VBA.UCase(Me.TextBox1)
    If vt = "ACERO" Then
        Me.TextBox2.Visible = True
    Else
        Me.TextBox2.Visible = False
    End If
On Error GoTo 0
End Sub

Private Sub UserForm_Initialize()
    Me.TextBox2.Visible = False
End Sub

 

Saludos 

publicado

Otra forma :

Option Explicit
Private Sub TextBox1_Change()
    TextBox2.Visible = False
    Select Case TextBox1
        Case ""
            TextBox2.Visible = False
        Case "MADERA"
            TextBox2.Visible = False
        Case "CARTON"
            TextBox2.Visible = False
        Case "PAPEL"
            TextBox2.Visible = False
        Case "ACERO"
            TextBox2.Visible = True
    End Select

End Sub
Private Sub UserForm_Initialize()
    TextBox2.Visible = False
End Sub

Saludos.

  • Enigma25 bloqueó este tema

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.