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.

Bloquear ComboBox y TextBox dependiendo de la Selección

publicado

Buenas

Comunidad AyudaExcel

Acá tengo un archivo con sus ComboBox y TextBox correspondientes , en la ComboBox1 es una lista de dos palabras "AJUSTE" Y "CAMBIO DE PUESTO". Lo que necesito es montar un código que al seleccionar "AJUSTE" se bloqueen la ComboBox2 y ComboBox3. Por otro lado que cuando seleccione "CAMBIO DE PUESTO" Se bloquee el TextBox3. Por favor alguien que me ayude a desarrollar el código.

Adjunto el archivo

Gracias de antemano por su ayuda!

Bloqueo de ComboBox y TextBox.xls

Featured Replies

publicado

Hola, pues solo coloca este codigo en el Userform1

Private Sub ComboBox1_Change()
If ComboBox1 = "AJUSTE" Then
ComboBox2.Locked = True: ComboBox3.Locked = True
Else
ComboBox2.Locked = False: ComboBox3.Locked = False
End If
On Error Resume Next
If ComboBox1 = "CAMBIO DE PUESTO" Then
TextBox3.Locked = True
Else
TextBox3.Locked = False
End If
End Sub[/PHP]

publicado

Buenos días,

No sé si es el caso, pero en ocasiones interesa utilizar la propiedad visible, por ejemplo, así:


Private Sub UserForm_Initialize()
ComboBox1.AddItem "AJUSTE"
ComboBox1.AddItem "CAMBIO DE PUESTO"
ComboBox2.Visible = False: ComboBox3.Visible = False
Label4.Visible = False: Label3.Visible = False
End Sub

Sub ComboBox1_Change()
On Error Resume Next
If ComboBox1 = "AJUSTE" Then
ComboBox2.Visible = True: Label4.Visible = True
ComboBox3.Visible = False: Label3.Visible = False

Else
ComboBox2.Visible = False: Label4.Visible = False
ComboBox3.Visible = True: Label3.Visible = True
End If
If ComboBox1 = "CAMBIO DE PUESTO" Then
TextBox3.Locked = True
Else
TextBox3.Locked = False
End If
End Sub

[/CODE]

Saludos,

Juan.

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.