Está en la página 1de 1

Prueba ejercicio 13

Public Sub Ejercicio13()

Application.DisplayAlerts = False

N = InputBox("Que hoja desea borrar")

Worksheets(N).Delete

MsgBox ("Se van a borrar todas las hojas")

For Each hoja In Worksheets

If hoja.Name <> "Hoja1" Then

hoja.Delete

End If

Next

Application.DisplayAlerts = True

End Sub

Ejercicio 13 normal

Public Sub Ejercicio13()

N = InputBox("Que hoja desea borrar")

Worksheets(N).Delete

MsgBox ("Se van a borrar todas las hojas")

For Each hoja In Worksheets

If hoja.Name <> "Hoja1" Then

hoja.Delete

End If

Next

End Sub

También podría gustarte