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.

Agregar hoja y comprobar existencia

publicado

Hola

Por la red hay varias formas de encontrar con VBA si una hoja existe (hay una funcion UDF por ahi), pero este aporte es solo una forma diferente para agregar hojas en un libro, comprobar existencia y agregar un link que nos devuelve al menu u hoja principal

Espero que sirva

Sub agregarhojas()

Dim Hoja As Worksheet, NuevaHoja As String, NuevoNombreHoja As String

With Application
.ScreenUpdating = False
Sheets("Menu").Range("A1").Name = "Inicio"
NuevaHoja = .InputBox("Nombre de hoja:", "Agregar hojas")
If NuevaHoja = "Falso" Or NuevaHoja = "False" Or NuevaHoja = Empty Then Range("A1").Select: Exit Sub
NuevoNombreHoja = VBA.StrConv(NuevaHoja, vbProperCase)
For Each Hoja In Sheets
If VBA.StrConv(Hoja.Name, vbProperCase) = NuevoNombreHoja Then _
MsgBox "La hoja " & VBA.StrConv(Hoja.Name, vbProperCase) & " ya existe", , "" _
: Range("A1").Select: Exit Sub
Next Hoja
Sheets.Add(After:=Sheets(Sheets.Count)).Name = NuevoNombreHoja
ActiveSheet.Hyperlinks.Add Anchor:=Range("A1"), Address:="", SubAddress:= _
"Inicio", TextToDisplay:="Volver al menu..."
.ScreenUpdating = True
End With

End Sub[/PHP]

Adjunto el archivo

Saludos desde Honduras

Agregar hoja y comprobar existencia.zip

Featured Replies

No hay posts para mostrar

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.