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.

Borrar determinadas hojas del libro activo

publicado

Buenas!! ?

A ver quién puede ayudarme, tengo un libro con más de 100 hojas y quiero que se borre el contenido de todas, menos de dos hojas concretas ("GS" y "Macros") a partir de la celda A3.

Me parece que debería ser muy sencillo, pero el código me da error 13 no coinciden los tipos (línea 5?

  1. Sub Botón4_Haga_clic_en()
  2. Dim hoja As Worksheet
  3.  
  4. For Each hoja In Application.Worksheets
  5.     If hoja.Name <> "GS" Or "Macros" Then
  6.         hoja.Range("A3:G6000").Clear
  7.     End If
  8. Next hoja
  9.  
  10. End Sub

He probado declarando las hojas que quiero proteger como worksheet y comparando con If hoja.Name <> GS.Name Or Macros.Name Then, pero tampoco funciona.. ?

A ver si alguien puede ayudarme, pleeeaseee... GRACIAS!  ?

Featured Replies

publicado
  • Autor

Muchas gracias, Antoni!!! 

No te imaginas el ataque de risa que me ha dado al ver tu respuesta.... No sé cómo no me di cuenta, era tan simple...?

Ahora estoy peleándome con una Matriz.... Llevo tres días sin parar...?

Gracias de nuevo! ?

 

 

  • Toldeman locked y unlocked this tema

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.