VBA - Trap Key Strokes

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

5 Replies
2922 Views

Similar Articles

[PageSpeed] 23

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
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
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
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
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
Steve
1/8/2010 5:20:34 PM
Reply:

Similar Artilces:

VBA code to say Yes or No if any VBA code is present in ActiveWork
Using XL 2003 & 97 Would like hit Ctrl+Shift+V and have an answer either yes or no as to the presence of Any VBA code in the Active Workbook. I do know that about the VBA editor/Explorer or to press the Run Macro button and get a list from various sources . I would like to stay at the keyboard and process a series of macros including one to let me know if I even need to evoke the VBA explorer. TIA Dennis There is no bootstrap macro to tell you whether you have macros or not. If there were there would be no limit to virus writers. --- HTH, David McRitchie, Microsoft MVP - Excel ...

VBA and Scheduled task in Outlook
Hi, how can I: a) pull the query from somewhere and send it by e-mail automatically. E.g. I want to take a temperature table from http://www.wunderground.com/history/airport/EHAM/2009/7/10/DailyHistory.html?req_city=NA&req_state=NA&req_statename=NA where 2009/7/10 is the date of yesterday put it into an e-mail and send it automatically each day at 8 o'clock? b) if this is not possible, how can I send an e-mail with the attachment c:\Documents\query20090710.xls each day at 8 o'clock? my boss wants this automatized, I know how to write the VBA code for Excel, but don'...

Remap F2 key function to Enter key?
Could someone please tell me how I can set the Enter key to edit the selected cell in Excel 2002? (just like F2 does by default). Much appreciated On Nov 20, 12:08 pm, mark.hand...@gmail.com wrote: > Could someone please tell me how I can set the Enter key to edit the > selected cell in Excel 2002? (just like F2 does by default). > > Much appreciated Please help If your keyboard software allows re-mapping you may be able to do this. I would think that using the ENTER key for cell editing could cause some problems and would not be intuitive. How about just double-click the ce...

Print, Merged Cells, and VBA
Hello I'm looking for a code that will help me with a print job for a worksheet. There are a lot of merged cells and a lot of "IF"s to be used in the VBA for range selection. Thanks in advance, Sarr ...

Use VBA to update Access table or Query from Excel
Can I use VBA to update Access table or Query from Excel? Thanks in advance Hi Leungkong, > Can I use VBA to update Access table or Query from Excel? Of course, using ADO or DAO. See: http://www.erlandsendata.no/english/index.php?d=envbadacexportado Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Hi Jan, Thanks. I think ADO is what I want. But I am not only want to export from excel to access. I want to edit some data in access table. For example, Access has a table "ProductList" I want to use Excel to call the product by "Pro...

VLOOKUP in VBA
On the worksheet I can insert in a cell =VLOOKUP(C5, Hobokee.xls!AcsLow, 2) and it works perfectly, looks up the value in column 2 of the range named AcsLow in the same workbook. But elswhere I want in a macro to lookup the same table and assign the result to a variable BalAmt. BalAmt = VLOOKUP(AccNum, Hobokee.xls!AcsLow, 2) does not work. It gives a function not defined error on Hobokee. If instead of Hobokee I put Workbooks("Hobokee"), it gives function not defined error for VLOOKUP which it changes to VLookup. I have been overVLOOKUP in the Help file and see nothing wrong. W...

vba select field
Hi, having a button on a form, is it possible to select only some fields (all from the same table) of the current record instead of all fields? I've tried this code: RunCommand acCmdSelectRecord RunCommand acCmdCopy Forse dipende dei dati nel record. but it selects ALL fields in the form. Thank you. Remigio hi, On 10.04.2010 18:01, remigio wrote: > having a button on a form, is it possible to select only some fields > (all from the same table) of the current record instead of all fields? > I've tried this code: > > RunCommand acCmdSelectRecord &...

Turn pc speaker on/off with vba code
Is this possible? Thanks I found something here on how to do it withVBScript. You can probably modify it to work in VBA http://www.pcreview.co.uk/forums/thread-1468591.php -- HTH, Barb Reinhardt "David" wrote: > Is this possible? > Thanks Thanks Barb I'll have a go (I need to improve my web searching skills) "Barb Reinhardt" wrote: > I found something here on how to do it withVBScript. You can probably modify > it to work in VBA > > http://www.pcreview.co.uk/forums/thread-1468591.php > -- > HTH, > ...

Excel VBA/Macro programming for beginners
Hi all, I know a bit VB 6.0 programming. Will it help me to write exce vba/macro(same thing?).can anybody help me by providing some fre websites where i can have informations/codes for VBA/macro. Please tell me how could i make a *command Button * in a cell in th excel sheet -- sdebu_200 ----------------------------------------------------------------------- sdebu_2000's Profile: http://www.officehelp.in/member.php?userid=430 View this thread: http://www.officehelp.in/showthread.php?t=118812 Posted from - http://www.officehelp.i Try David McRitchie's "getting started with mac...

Disable close unless key held
Hi All, Is there a way to only enable the close command in excel if the "Shift" key is held (or any key for that matter) I have a little program that monitors a computer, but I don't want anyone to close it. (At this time I am not worried if they kill the process). Thanks Chad There are several ways to close Excel, 2 ways with the main Excel icon, the little-x on the main window, Alt-F4, and File/Exit. Only the latter in 2000-2003 can easily be intercepted. To trap the others would require doing a lot of stuff that's not practical. A different a...

Loading a Form from VBA
Hi all, I'd like a module to open and load a form in my Access 2003 database... How can I do this? Use the OpenForm method. Look in the Help file for details. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Mike" <michael.leon.schwartz@gmail.com> wrote in message news:1184770076.109526.207900@o11g2000prd.googlegroups.com... > Hi all, I'd like a module to open and load a form in my Access 2003 > database... How can I do this? > On Jul 18, 10:58 am, "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com&g...

MS CRM Installation version 1.2 Licence key problem
Hi I have got MSDN version of MS CRM 1.2. There is a Product key on the box of the cd and it said that go to link below to get a licence key by this product key in the readme.html in the CRM setup CD 1. Bu I couldn' get a licence key by this way do you have any idea about this situation or may you know another web address to get a licence key for MS CRM 1.2 Thanks Göksal Ersen Çelebi Senior Software Engineer Hi, the license key isn't on the case of Disk1, you may contact Microsoft and tell them your company name, they will give you a License key. Alternately, you ...

Excel and VBA
I am very interested in learning more about using VBA in office, especially Excel. Can you post some resources (online, books, etc) that can be used to help learn about using Visual Basic in office. Thanks! Here's a good place to start: http://www.contextures.com/xlbooks.html Does that help? *********** Regards, Ron XL2002, WinXP "Bob Sinclair" wrote: > I am very interested in learning more about using VBA in office, especially > Excel. Can you post some resources (online, books, etc) that can be used to > help learn about using Visual Basic in office. >...

VBA Customization
Is there a way to get the name of the current company through VBA in Great Plains 8.0? Thanks for all your help. open GreatPlains. Add the current window, it will add the Toolbar then add fields choose the company name on the top left after the user id. >-----Original Message----- >Is there a way to get the name of the current company through VBA in Great >Plains 8.0? > >Thanks for all your help. > > > >. > Thanks. I tried, but I couldn't add company name to the field list. It opens up the login screen instead. Any thoughts? Thanks again. "ger...

Form Controls vs VBA controls
I am new to VBA so just finding my feet, can anyone help me with th differences between an excel control (i.e. one from the form toolbox lets say a checkBox and a vba checkBox? From trying the two controls the I have noticed is that you canno capture the change event of the VBA checkbox in the code module, it ha to be done via the sheet (i.e. checkbox on sheet1, code goes in chang event on sheet1) the control is placed on, is this correct? What woul you do if you have three sheets with the same controls just differen data, do you really have to code the control 3 times? The excel control ho...

Run VBA without show
I want excel to run the VBA code without showing me what it is doing. Which code should i use for that? Sub RunWithoutShow() Application.ScreenUpdating = False 'Paste the vba code here 'end of code 'Change screenupdating property to true Application.ScreenUpdating = True End Sub I hope this helps... Selva V Pasupathy For more on Excel, VBA, & other Resources Please visit: http://socko.wordpress.com You may also (inserting into quote from code example bellow from Socko) Use Application.Visible property to hide the application entirely Sub RunWithoutShow() Appli...

Referencing a ComboBox in VBA
Hi, I am using Excel 2007. I want to run some code in my Workbook_Open() Sub that fills a combo box on one of my Worksheets (I will call it myCombo on mySheet). I tried the following code and it did not work: myCombo.Clear myCombo.AddItem "Item One" myCombo.AddItem "Item Two" myCombo.AddItem "Item Three" I assume that the problem is that within the Workbook_Open() Sub, the reference to myCombo is not valid. Can anyone tell me if/how I can get a valid reference to myCombo (on mySheet)? Thanks in advance, Paul Kraemer -- Paul Krae...

inserting and renaming a sheet vba
Instead of having 2 lines of code, one to insert a new sheet and one t rename it, is there a way to insert a sheet with particular name i one go -- Matt Housto ----------------------------------------------------------------------- Matt Houston's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=451 View this thread: http://www.excelforum.com/showthread.php?threadid=26717 ...

VBA??
Is there any way i can input certain numbers and they change to words. for example. 2001 Omagh 2002 Craigavon 2027 Housing Benefit 2036 IT Replacment any help please thanks monty If you mean you want to enter 2001 in cell A1 and have "Omagh" magically appear in its place when you hit the return key, I don't think it can be done. However, if you enter 2001 in cell A1 and have a VLOOKUP formula in cell B1, with reference data stored elsewhere in the sprdsht, that is easily done. Monty How many substitutes do you have? You are probably best to set up a separate table with ...

Using VBA to automatically add a new date to my table?
I would like to have my table (perhaps through a form) automatically add a new record with the date, every 24 hours, starting at midnight, 24/7/365 How do I do that? Also, And how do I search my username VWP1, because I tried searching users, typed in my VWP1 username, and no records were found? VWP1 On Fri, 5 Mar 2010 08:23:02 -0800, VWP1 <VWP1@discussions.microsoft.com> wrote: >I would like to have my table (perhaps through a form) automatically add a >new record with the date, every 24 hours, starting at midnight, 24/7/365 >How do I do that? Why th...

Need VBA code that enters the F2 Key upon entering the Field
I am using Access 2000. I understand that simply by pressing the F2 key while the cursor is in that field, you can toggle Off and ON the highlighting for that field (textbox). Can someone explain the necessary VBA code to perform this action without the user's intervention? "nytwodees" <nytwodees@discussions.microsoft.com> wrote in message news:E128AC11-3153-4A50-9873-F3BFACAC91B1@microsoft.com... >I am using Access 2000. > > I understand that simply by pressing the F2 key while the cursor is in > that > field, you can toggle Off and ON th...

Auto Calendars in VBA
Need to create a monthly schedule for work.To enter the dates (Numbers) into every other cell this is what I have so far Activecell.Select Activecell.Offset(0,2)=Activecell+1 I'm wondering is there an easier way to do this.Right now I have one module for the Year 2006 with sub's for each month.These will get called when form dropdown list show's that month. if frmMonth.cboMonth.Value="January" & frmMonth.cboYear.value="2006" then Call Year2006.Jan06 end if Is there an easier way to determine the today's date then creating Next month's c...

How make an Accelerator key work regardless of which control has fokus?
Hello, I have an MFC, CFormView, application. On the form I have several different controls, e.g. Edit control, Tab control (in the tab control I have a grid control) I also have defined an accelerator key (F5). Now to my problem: If the focus is set to one of the edit controls then the accelerator key will work. But if the focus is on the grid control then nothing happens... I guessing that the grid control, or the tab control, is "eating" the key but how do I make the key "visible" to the form? I'm using VC++ 2005 and the grid is Mr. Chris Maunders MFC Grid ver...

vba
salut j'ai une probleme sur vba que je n'arrive pas resoudre : j'ai un tableau de donnees (qui sont rentrees avec des userform). pour supprimer une ligne de ce tableau, j'ai cree un userform avec une liste deroulante dont la rowsource est la premiere colonne de mon tableau. je voudrais , en selectionnant une valeur ds cette liste, qu'elle soit selectionnee ds mon classeur excel pour que je puisse supprimer la ligne. merci de votre aide -- Ce message a ete poste via la plateforme Web club-Internet.fr This message has been posted by the Web platform club-Internet.fr ...

Cannot access product key
I've got a problem in Outlook which I'm already reporting in the General section of the newsgroup. However, as we don't appear to be having much luck resolving it then I'm trying to contact Microsoft for online assistance. However, the support tool asks for the Product key from the Help, About screen. My problem is that I can't get into Outlook to get to the Help menu! The key they require isn't the one off the disk packaging, it's the converted number that Outlook uses once installed. Anyone got any suggestions? Well firstly if you cross posted, by ent...