- Código: Seleccionar todo
Sub shapekiller()
Dim ws As Worksheet
Dim SH As Shape
For Each ws In Worksheets
For Each SH In ws.Shapes
SH.Delete
Next
Next
End Sub
Salu2.xls
Sub shapekiller()
Dim ws As Worksheet
Dim SH As Shape
For Each ws In Worksheets
For Each SH In ws.Shapes
SH.Delete
Next
Next
End Sub

Activesheet.DrawingObjects.Delete
Sub shapekiller()
On Error Resume Next
Dim ws As Worksheet
Dim SH As Shape
For Each ws In Worksheets
If ws.CodeName <> "Licencia" Then
For Each SH In ws.Shapes
If SH.Type = 1 Then SH.Delete 'Dibujos
If SH.Type = 9 Then SH.Delete 'Líneas y flechas
If SH.Type = 12 Then SH.Delete 'Controles VBA
If SH.Type = 13 Then SH.Delete 'Imágenes
If SH.Type = 15 Then SH.Delete 'WordArt
If SH.Type = 17 Then SH.Delete 'Cuadros de texto
Next
End If
Next
End Sub

Volver a Macros, programación y códigos
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados