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.

Evento Calculate con 2 acciones

publicado

Buenos días amigo: Hace tiempo que ando tras la solucion de un problema que va relacionado con un EVENTO CALCULATE, lo que quiero hacer es dentro de un mismo evento trabajen por separado dos acciones. el codigo es el siguiente

Private Sub Worksheet_Calculate()


Static MiValor As Double
If MiValor = 1 Then MiValor = [L8]
If MiValor = [L8] Then Exit Sub
MsgBox "Esta OP. ya fue leida anteriormente, intentelo nuevamente!"
MiValor = [L8]
[E9].Select
Selection.End(xlDown).Select
Selection.ClearContents


'Static MiValor2 As Double
'If MiValor2 = 1 Then MiValor2 = [L9]
'If MiValor2 = [L9] Then Exit Sub
'MsgBox "Esta OP. no pertenece a la zona q usted hace referencia, intentelo nuevamente!"
'MiValor2 = [L9]
'[E9].Select
'Selection.End(xlDown).Select
'Selection.ClearContents

End Sub
[/HTML]

Lo que necesito es que cuando la celda L8 tome el valor 1 se ejecute la primera accion, y cuando L9 tome el valor 1 se ejecute la segunda accion.

Como dato importante, cabe destacar que estos dos valores nunca pueden ser iguales, es decir nunca L8 y L9 pueden ser 1 al mismo tiempo.

Desde ya muchas gracias por su ayuda.

Featured Replies

publicado

Buenas. No entiendo muy bien como toma el valor las celdas. Pero prueba con un if y un else if


if [L8]= 1 then
 ' tu código
elseif [L9]= 1 then
 ' tu código
end if

Saludos.

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.