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.

Macro que no permite guardar archivo si 2 celdas están en blanco

publicado

Estimados,

Junto con saludar, quisiera pedirles ayuda con la siguiente macro.

Resulta que tengo un formulario en el cual no quiero que se guarde si las celdas D11 y D13 no se han ingresado datos, pero dada esta macro necesito algo que a la vez me permita guardarlo si el formulario esta completamente en blanco.

Esta macro me funciona bien al permitir que el archivo se guarde si ambas celdas no tienen datos, pero a la vez me genera problemas para guardar el formulario si este esta en blanco.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

If Sheets("Formulario").Range("D11") = "" Or Sheets("Formulario").Range("D12") = "" Or Sheets("Formulario").Range("D13") "" Then

Cancel = True

MsgBox "No se puede guardar el archivo mientras " _

& vbLf & "no se completen los datos obligatorios :"

End If

End Sub

Favor si me pudieran ayudar con esto.

De ante mano muchas gracias.

Saludos,

Featured Replies

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.