VBA - Trap Key Strokes

  • Follow


Can you trap the keyup or keydown events at the application level using VBA? 
if so, how is that done?
0
Reply Utf 1/6/2010 8:59:02 PM

You might want to subclass PowerPoint's main window and see if the messages 
that you get are the ones you want to handle. An example of how to subclass 
PowerPoint's main window is available at 
http://officeone.mvps.org/vba/subclass_powerpoint.html

- Chirag

  PowerShow - View multiple PowerPoint slide shows simultaneously
  http://officeone.mvps.org/powershow/powershow.html

"George Lee" <GeorgeLee@discussions.microsoft.com> wrote in message 
news:5A9F9608-80E3-45D4-9302-2444FB237395@microsoft.com...
> Can you trap the keyup or keydown events at the application level using 
> VBA?
> if so, how is that done? 

0
Reply Chirag 1/7/2010 3:27:17 PM

In article <5A9F9608-80E3-45D4-9302-2444FB237395@microsoft.com>, George Lee 
wrote:
> Can you trap the keyup or keydown events at the application level using VBA? 
> if so, how is that done?

Unless there's some way of doing it via the Windows API (and there may well 
be), no.  VBA doesn't offer any support for this.


==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Reply Steve 1/7/2010 5:37:28 PM

Did Microsoft ever explain why they did away with the user-customized key 
mapping in PowerPoint?

"Steve Rindsberg" wrote:

> In article <5A9F9608-80E3-45D4-9302-2444FB237395@microsoft.com>, George Lee 
> wrote:
> > Can you trap the keyup or keydown events at the application level using VBA? 
> > if so, how is that done?
> 
> Unless there's some way of doing it via the Windows API (and there may well 
> be), no.  VBA doesn't offer any support for this.
> 
> 
> ==============================
> PPT Frequently Asked Questions
> http://www.pptfaq.com/
> 
> PPTools add-ins for PowerPoint
> http://www.pptools.com/
> 
> 
> .
> 
0
Reply Utf 1/7/2010 7:14:01 PM

This is very clever. Thanks. It did solve another problem I was working on.

"Chirag" wrote:

> You might want to subclass PowerPoint's main window and see if the messages 
> that you get are the ones you want to handle. An example of how to subclass 
> PowerPoint's main window is available at 
> http://officeone.mvps.org/vba/subclass_powerpoint.html
> 
> - Chirag
> 
>   PowerShow - View multiple PowerPoint slide shows simultaneously
>   http://officeone.mvps.org/powershow/powershow.html
> 
> "George Lee" <GeorgeLee@discussions.microsoft.com> wrote in message 
> news:5A9F9608-80E3-45D4-9302-2444FB237395@microsoft.com...
> > Can you trap the keyup or keydown events at the application level using 
> > VBA?
> > if so, how is that done? 
> 
> .
> 
0
Reply Utf 1/8/2010 3:13:01 PM

In article <CBDD48F1-321C-4EB0-AE5F-6F21449D7175@microsoft.com>, George Lee wrote:
> Did Microsoft ever explain why they did away with the user-customized key 
> mapping in PowerPoint?

I don't recall that it ever *had* this feature; the other main Office apps did, 
other than the ability to assign keystrokes to buttons on custom toolbars.

> 
> "Steve Rindsberg" wrote:
> 
> > In article <5A9F9608-80E3-45D4-9302-2444FB237395@microsoft.com>, George Lee 
> > wrote:
> > > Can you trap the keyup or keydown events at the application level using VBA? 
> > > if so, how is that done?
> > 
> > Unless there's some way of doing it via the Windows API (and there may well 
> > be), no.  VBA doesn't offer any support for this.
> > 
> > 
> > ==============================
> > PPT Frequently Asked Questions
> > http://www.pptfaq.com/
> > 
> > PPTools add-ins for PowerPoint
> > http://www.pptools.com/
> > 
> > 
> > .
> >


==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Reply Steve 1/8/2010 5:20:34 PM

5 Replies
1729 Views

(page loaded in 0.075 seconds)


Reply: