- Código: Seleccionar todo
Sub ListaHojas()
On Error GoTo DoNothing
With Application.CommandBars("workbook tabs").Controls(16)
If Right(.Caption, 3) = "..." Then .Execute Else .Parent.ShowPopup
End With
Exit Sub
DoNothing:
End Sub
Sub ListaHojas()
On Error GoTo DoNothing
With Application.CommandBars("workbook tabs").Controls(16)
If Right(.Caption, 3) = "..." Then .Execute Else .Parent.ShowPopup
End With
Exit Sub
DoNothing:
End Sub



Private Sub Worksheet_Activate()
Dim cHoja As Worksheet
Dim L As Long
L = 1
With Me
.Columns(1).ClearContents
.Cells(1, 1) = "INDICE"
.Cells(1, 1).Name = "Indice"
End With
For Each cHoja In Worksheets
If cHoja.Name <> Me.Name Then
L = L + 1
With cHoja
.Range("A1").Name = "Inicio" & cHoja.Index
.Hyperlinks.Add Anchor:=.Range("A1"), Address:=" ", SubAddress:="Indice", TextToDisplay:="Volver al índice"
End With
Me.Hyperlinks.Add Anchor:=Me.Cells(L, 1), Address:=" ", SubAddress:="Inicio" & cHoja.Index, TextToDisplay:=cHoja.Name
End If
Next cHoja
End Sub



Volver a Macros, programación y códigos
Usuarios navegando por este Foro: ALEJANDROREYES y 1 invitado