Saltar al contenido principal

¿Cómo navegar entre hojas de trabajo usando la lista desplegable en Excel?

Supongamos que tiene un libro de trabajo que contiene varias hojas de trabajo, ahora, necesita crear una lista desplegable o un cuadro combinado que enumere todos los nombres de las hojas y cuando seleccione un nombre de hoja de la lista desplegable, saltará a esa hoja inmediatamente. En este artículo, presentaré cómo navegar entre hojas de trabajo usando una lista desplegable en Excel.

Navegue entre hojas de trabajo usando la lista desplegable en Excel


Navegue entre hojas de trabajo usando la lista desplegable en Excel

Para saltar a cada hoja seleccionada utilizando una lista desplegable, siga los siguientes pasos:

1. Hacer clic Developer > recuadro > Cuadro combinado (control ActiveX), ver captura de pantalla:

2. Luego arrastre el mouse para dibujar un cuadro combinado y luego haga clic con el botón derecho, seleccione Ver código en el menú contextual, vea la captura de pantalla:

3. En el abierto Microsoft Visual Basic para aplicaciones ventana, copie y pegue el siguiente código para reemplazar el código original, vea la captura de pantalla:

Código de VBA: navegue entre hojas de trabajo usando la lista desplegable

Private Sub ComboBox1_Change()
'Updateby Extendoffice
    If ComboBox1.ListIndex > -1 Then Sheets(ComboBox1.Text).Select
End Sub
Private Sub ComboBox1_DropButtonClick()
    Dim xSheet As Worksheet
    On Error Resume Next
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    If ComboBox1.ListCount <> ThisWorkbook.Sheets.Count Then
        ComboBox1.Clear
        For Each xSheet In ThisWorkbook.Sheets
            ComboBox1.AddItem xSheet.Name
        Next xSheet
    End If
    Application.EnableEvents = True
    Application.ScreenUpdating = True
End Sub
Private Sub ComboBox1_GotFocus()
    If ComboBox1.ListCount <> 0 Then ComboBox1.DropDown
End Sub

4. Luego guarde y cierre esta ventana de código, y luego haga clic en Modo de diseño para desactivar el modo de diseño, ahora, al seleccionar un nombre de hoja del cuadro combinado, irá a esa hoja de una vez, vea la captura de pantalla:


Navegue entre hojas de trabajo utilizando hipervínculos o botones:

Con Kutools for Excel's Crear lista de nombres de hojas utilidad, puede enumerar rápidamente todos los nombres de las hojas de trabajo en una nueva hoja con hipervínculos o botones de macro, luego puede navegar entre ellos según sus necesidades.

Kutools for Excel: con más de 300 prácticos complementos de Excel, prueba gratuita y sin límite en 30 días. ¡Descarga y prueba gratis ahora!

Las mejores herramientas de productividad de oficina

🤖 Asistente de IA de Kutools: Revolucionar el análisis de datos basado en: Ejecución inteligente   |  Generar codigo  |  Crear fórmulas personalizadas  |  Analizar datos y generar gráficos  |  Invocar funciones de Kutools...
Características populares: Buscar, resaltar o identificar duplicados   |  Eliminar filas en blanco   |  Combine columnas o celdas sin perder datos   |   Ronda sin fórmula ...
Super búsqueda: Búsqueda virtual de criterios múltiples    Búsqueda V de valores múltiples  |   VLookup en varias hojas   |   Búsqueda difusa ....
Lista desplegable avanzada: Crear rápidamente una lista desplegable   |  Lista desplegable dependiente   |  Lista desplegable de selección múltiple ....
Administrador de columnas: Agregar un número específico de columnas  |  Mover columnas  |  Toggle Estado de visibilidad de columnas ocultas  |  Comparar rangos y columnas ...
Características destacadas: Enfoque de cuadrícula   |  Vista de diseño   |   Gran barra de fórmulas    Administrador de hojas y libros de trabajo   |  Biblioteca de Recursos (Texto automático)   |  Selector de fechas   |  Combinar hojas de trabajo   |  Cifrar/descifrar celdas    Enviar correos electrónicos por lista   |  Súper filtro   |   Filtro especial (filtro negrita/cursiva/tachado...) ...
Los 15 mejores conjuntos de herramientas12 Texto Herramientas (Añadir texto, Quitar caracteres, ...)   |   50+ Tabla Tipos (Diagrama de Gantt, ...)   |   40+ Práctico Fórmulas (Calcular la edad según el cumpleaños, ...)   |   19 Inserción Herramientas (Insertar código QR, Insertar imagen desde la ruta, ...)   |   12 Conversión Herramientas (Números a palabras, Conversión de Moneda, ...)   |   7 Fusionar y dividir Herramientas (Filas combinadas avanzadas, Células partidas, ...)   |   ... y más

Mejore sus habilidades de Excel con Kutools for Excel y experimente la eficiencia como nunca antes. Kutools for Excel ofrece más de 300 funciones avanzadas para aumentar la productividad y ahorrar tiempo.  Haga clic aquí para obtener la función que más necesita...

Descripción


Office Tab lleva la interfaz con pestañas a Office y hace que su trabajo sea mucho más fácil

  • Habilite la edición y lectura con pestañas en Word, Excel, PowerPoint, Publisher, Access, Visio y Project.
  • Abra y cree varios documentos en nuevas pestañas de la misma ventana, en lugar de en nuevas ventanas.
  • ¡Aumenta su productividad en un 50% y reduce cientos de clics del mouse todos los días!
Comments (12)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The drop down list will not open hidden sheets, is it able to open hidden sheets?
This comment was minimized by the moderator on the site
hi, is it possible to combine various option from different dropdowns and open sheets accordingly.

eg: if Option1 from dropdown1 is selected and Option2 from dropdown2 is selected then only the Sheet2 will open
This comment was minimized by the moderator on the site
hi there,
Thank you very much for the code which create a dynamic combo box to navigate the sheets. Unfortunately I got an error. After navigating few sheets, the file automatically close. It doesn't even show any error message. I couldn't figure out the reason. I appreciate the help
Thanks
This comment was minimized by the moderator on the site
same error too, Did you figure it out?
This comment was minimized by the moderator on the site
thanks for your code. It works for switching different sheet based on dropdown list.
But I have several questions.
1. after I process the related sheet, and want to go back to main menu(with sheet dropdown list), how could I do without using mouse?
2. when I open the file, I would like the main menu(with dropdown list) as default . So I could start from this menu
thanks
rose
This comment was minimized by the moderator on the site
How do you change this to only show/select visible worksheets?
This comment was minimized by the moderator on the site
Hi,
To ignore the hidden sheets from the drop down list, and only keep the visible worksheets, the following VBA code may help you:

Private Sub ComboBox1_Change()
'Updateby Extendoffice
If ComboBox1.ListIndex > -1 Then Sheets(ComboBox1.Text).Select
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim xSheet As Worksheet
On Error Resume Next
Application.ScreenUpdating = False
Application.EnableEvents = False
If ComboBox1.ListCount <> ThisWorkbook.Sheets.Count Then
ComboBox1.Clear
For Each xSheet In ThisWorkbook.Sheets
If xSheet.Visible Then
ComboBox1.AddItem xSheet.Name
End If
Next xSheet
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub ComboBox1_GotFocus()
If ComboBox1.ListCount <> 0 Then ComboBox1.DropDown
End Sub

Please try it, hope it can help you!
This comment was minimized by the moderator on the site
It worked! Thank you! Do you know if this code will cause problems if sheets are renamed or will it update the list automatically?
This comment was minimized by the moderator on the site
Hello,
The above code works well when renaming the sheet name and the items in the drop down list will be updated automatically.
You can try it.
This comment was minimized by the moderator on the site
How can I add only specific sheets? and not all the sheet in the workbook
This comment was minimized by the moderator on the site
Did you have any joy finding code to show only certain sheets in the dropdown box?
This comment was minimized by the moderator on the site
How can I make the hidden sheet active and hide the home page?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations