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.

Mostrar MSGBOX al pulsar una tecla o un atajo de teclado

publicado

Hola a todos,

 

Me gustaría que al pulsar una tecla o un atajo de teclado, se le aparezca un mensaje en un MsgBox al usuario de la aplicación ofimática.

No sé muy bien cómo plantear el problema.

Se me ocurre lo siguiente, pero no funciona:

Sub MostrarMensaje()
   If Application.OnKey Key:="{c}" Then MsgBox "Hola mundo"
End Sub

Alguien tiene una idea mejor?

 

Gracias.

Featured Replies

publicado
  • Autor
En 23/7/2021 at 18:14 , Gerson Pineda dijo:

Onkey, tiene un argumento opcional, que es llamar a un procedimiento, bueno ahi agregas el mensaje y listo

Sub MostrarMensaje()
   If Application.OnKey Key:="{c}" Then "MiSub"
End Sub

Sub MiSub()

VBA.MsgBox "Hola mundo"

End Sub

 

Saludos 

Gracias @Gerson Pineda.

Me tocará hacerlo así... Que remedio!

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.